/* ==================================================
   🎨 Base Layout and Typography
   ================================================== */
body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #222;
    background-color: #f9f9f9;
    margin: 0;
    padding: 1rem;
}

h2,
h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #003366;
}

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: 1rem;
    margin-top: 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.collapsible:hover {
    background-color: #cce0ff;
}

.content {
    display: none;
    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: 1rem;
}

table.un-records-table th,
table.un-records-table td,
#variantTable th,
#variantTable td,
#idPairsTable th,
#idPairsTable td {
    border: 1px solid #ccc;
    padding: 0.75rem;
    text-align: left;
    word-break: break-word;
}

table.un-records-table th,
#variantTable th,
#idPairsTable th {
    background-color: #f0f8ff;
    font-weight: bold;
}

#variantTable tr.selected {
    background-color: #d9edf7;
}

.screen-reader-text {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ==================================================
   🔍 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;
}

/* ==================================================
   💾 Form Actions
   ================================================== */
.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn.confirm {
    background-color: #28a745;
    color: white;
}

.btn.cancel {
    background-color: #dc3545;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

.btn.proceed {
    background-color: #007bff;
    color: white;
}

.btn.proceed:hover {
    background-color: #0056b3;
}

/* ==================================================
   📣 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;
}
/* ==================================================
   📱 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.875rem;
    }
}
.highlight-unno {
    background-color: #fff3cd;
    /* light yellow */
    font-weight: bold;
    transition: background-color 0.3s ease;
}

/* ==================================================
   📱 Delete Button
   ================================================== */

   .delete-record-btn {
       background-color: #f44336;
       color: white;
       border: none;
       padding: 0.5em 1em;
       border-radius: 6px;
       font-size: 0.95em;
       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: white;
   }
/* ==================================================
   Navigation Button
   ================================================== */
   .navigation-buttons {
       display: flex;
       justify-content: space-between;
       align-items: center;
       margin-top: 2rem;
       padding: 1rem 0;
       border-top: 1px solid #eee;
   }

   .nav-btn {
       padding: 0.6rem 1.2rem;
       font-size: 1rem;
       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;
   }

   /* ==================================================
    multimodalForm
   ================================================== */
.multimodal-form {
    max-width: 1100px;
    margin: 2rem auto;
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
}

.form-title {
    text-align: center;
    font-size: 1.5rem;
    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.95rem;
    border: 1px solid #999;
    border-radius: 4px;
}

.form-table textarea {
    height: 60px;
    resize: vertical;
}

.declaration-box,
.declaration {
    background-color: #f9f9f9;
    padding: 0.75rem;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    margin-top: 0.5rem;
}

.form-actions {
    margin-top: 2rem;
    text-align: right;
}

.btn {
    padding: 0.6rem 1.2rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    margin-left: 0.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
}

.btn.confirm {
    background-color: #28a745;
    color: white;
}

.btn.cancel {
    background-color: #dc3545;
    color: white;
}

.btn:hover {
    opacity: 0.9;
}

.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 {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 1rem;
}

.reset-button:hover {
    background-color: #d32f2f;
}
.imdg-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #323232;
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    font-weight: bold;
    z-index: 9999;
    display: none;
}
.hazshield-main-page {
    padding: 2rem;
    font-size: 1.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;
}

#variantTable td:first-child {
    text-align: center;
    vertical-align: middle;
}

.variant-checkbox {
    transform: scale(1.2);
}