/* ==================================================
   🎨 Base Layout and Typography
   ================================================== */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
    background: url('your-background.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #f0f0f0;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(9, 9, 9, 0.7);
    /* dark overlay */
    z-index: -1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 1rem;
    border-bottom: 1px solid #444;
}

header a {
    color: #00bcd4;
    text-decoration: none;
    font-weight: bold;
}

/* ==================================================
   📦 Main Content Container
   ================================================== */
.main-content {
    max-width: 800px;
    margin: 3.75rem auto;
    padding: 2.5rem;
    background-color: rgba(20, 20, 20, 0.85);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

.main-content h1 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: #00e5ff;
}

.main-content p {
    font-size: 1rem;
    line-height: 1.6;
}

/* ==================================================
   🧾 Footer
   ================================================== */
footer {
    text-align: center;
    padding: 1.25rem;
    color: #aaa;
    font-size: 0.8rem;
}

/* ==================================================
   📝 Headings and Table Styling
   ================================================== */
h2,
h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1rem;
    color: hsl(210, 10%, 96%);
}

h4 {
    margin: 1rem 0 0.5rem;
    font-size: 1rem;
    color: hsl(210, 100%, 2%);
}

.table-h4-style th,
.table-h4-style td {
    font-size: 0.7rem;
    padding: 2px 4px;
    color: #000;
    border-bottom: 1px solid #ccc;
}

/* ==================================================
   🏷️ Form Labels
   ================================================== */
label {
    display: block;
    margin: 0.5rem 0 0.25rem;
    font-weight: bold;
}

/* ==================================================
   🧩 Form Container
   ================================================== */
#imdgForm {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 2rem;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

/* ==================================================
   🔽 Collapsible Sections
   ================================================== */
.collapsible {
    background-color: #e6f2ff;
    color: #003366;
    cursor: pointer;
    padding: 0.75rem 1rem;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.2rem;
    margin-top: 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.collapsible:hover {
    background-color: #cce0ff;
}

.content {
    display: none;
    background-color: #e6f2ff;
    padding: 1rem 0;
    border-top: 1px solid #ccc;
}

/* ==================================================
   📋 Select Dropdown
   ================================================== */
select {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* ==================================================
   📊 Tables — Full Width & Responsive
   ================================================== */
table.un-records-table,
#variantTable,
#idPairsTable {
    width: 100%;
    max-width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

table.un-records-table th,
table.un-records-table td,
#variantTable th,
#variantTable td,
#idPairsTable th,
#idPairsTable td {
    border: 1px solid #ccc;
    padding: 0.1rem;
    text-align: left;
    font-size: 0.8rem;
    word-break: break-word;
}

table.un-records-table th,
#variantTable th,
#idPairsTable th {
    background-color: #f0f8ff;
    font-size: 1rem;
    color: #003366;
}

#variantTable tr.selected {
    background-color: #d9edf7;
}

#variantTable td:first-child {
    text-align: center;
    vertical-align: middle;
}

.variant-checkbox {
    transform: scale(1.2);
}

/* ==================================================
   🔍 Preview Panel
   ================================================== */
#previewPanel table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

#previewPanel th,
#previewPanel td {
    border: 1px solid #ddd;
    padding: 0.5rem;
}

#previewPanel th {
    background-color: #f7f7f7;
    width: 30%;
    font-weight: normal;
}

#previewPanel td {
    background-color: #fff;
}

/* ==================================================
   🧏 Screen Reader Accessibility
   ================================================== */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    font-size: 0.8rem;
    overflow: hidden;
}

/* ==================================================
   💾 Form Actions
   ================================================== */
.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    text-align: right;
}

/* ==================================================
   🧵 Buttons
   ================================================== */
button,
.btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    margin-left: 0.5rem;
}

.btn-green,
.btn.confirm {
    background-color: #4caf50;
    color: #fff;
}

.btn-red,
.btn.cancel {
    background-color: #f44336;
    color: #fff;
}

.btn-blue,
.btn.proceed {
    background-color: #2196f3;
    color: #fff;
}

.btn.proceed:hover {
    background-color: #0056b3;
}

button:hover,
.btn:hover {
    opacity: 0.9;
}

/* ==================================================
   🗑️ Delete Button
   ================================================== */
.delete-record-btn {
    background-color: #f44336;
    color: #fff;
    border: none;
    padding: 0.5em 1em;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.delete-record-btn:hover {
    background-color: #d32f2f;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.delete-record-btn:focus {
    outline: 2px solid #d32f2f;
    outline-offset: 2px;
}

.icon-delete {
    display: inline-block;
    vertical-align: middle;
    fill: #fff;
}

/* ==================================================
   🧭 Navigation Buttons
   ================================================== */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid #eee;
}

.nav-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background-color: #ff6600;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-btn:hover {
    background-color: #e65c00;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.back-btn {
    margin-right: auto;
}

.next-btn {
    margin-left: auto;
}

/* ==================================================
   🧠 Multimodal Form Layout
   ================================================== */
.multimodal-form {
    max-width: 1100px;
    margin: 2rem auto;
    font-family: Arial, sans-serif;
    font-size: 0.8rem;
}

.form-title {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

.form-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.form-table td {
    border: 1px solid #333;
    padding: 0.5rem;
    vertical-align: top;
}

.form-table label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.25rem;
}

.form-table input[type="text"],
.form-table input[type="number"],
.form-table textarea {
    width: 100%;
    padding: 0.4rem;
    box-sizing: border-box;
    font-size: 0.8rem;
    border: 1px solid #999;
    border-radius: 4px;
}

.form-table textarea {
    height: 60px;
    resize: vertical;
}

/* ==================================================
   📜 Declaration Sections
   ================================================== */
.declaration-box,
.declaration {
    background-color: #f9f9f9;
    padding: 0.75rem;
    font-size: 0.8rem;
    border: 1px solid #ccc;
    margin-top: 0.5rem;
}

/* ==================================================
   🟢 Session Indicator
   ================================================== */
.session-indicator {
    background-color: #e6f4ea;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ==================================================
   🔄 Reset Button
   ================================================== */
.reset-button {
    background-color: #f44336;
    color: #fff;
    border: none;
    padding: 0.6rem 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 1rem;
}

.reset-button:hover {
    background-color: #d32f2f;
}

/* ==================================================
   🛡️ HazShield Main Page
   ================================================== */
.hazshield-main-page {
    padding: 2rem;
    font-size: 1rem;
    line-height: 1.6;
    background-color: #f9f9f9;
    border-radius: 8px;
    max-width: 800px;
    margin: 2rem auto;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.hazshield-main-page a {
    color: #0073aa;
    font-weight: bold;
    text-decoration: underline;
}

/* ==================================================
   📣 Status Message
   ================================================== */
#saveStatus {
    margin-top: 1rem;
    font-weight: bold;
    transition: opacity 0.3s ease;
}

/* ==================================================
   📱 Responsive Scroll Containers
   ================================================== */
.un-records-panel,
#variantTableContainer,
#idPairsContainer,
#previewPanel {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 1rem 0;
    box-sizing: border-box;
    overflow-x: auto;
}

.container,
.content-area {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* ==================================================
   ✨ Highlighted UN Number
   ================================================== */
.highlight-unno {
    background-color: #fff3cd;
    /* light yellow */
    font-weight: bold;
    transition: background-color 0.3s ease;
}

/* ==================================================
   📱 Responsive Design
   ================================================== */
@media (max-width: 768px) {
    #imdgForm {
        padding: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    table.un-records-table th,
    table.un-records-table td,
    #variantTable th,
    #variantTable td,
    #previewPanel th,
    #previewPanel td {
        font-size: 0.8rem;
    }
}