/* Container styling */
#sas-auth-form {
    max-width: 500px;           /* Form width */
    margin: 50px auto;           /* Center horizontally with top/bottom margin */
    padding: 40px 35px;  
    background-color: #fff;      /* White background */
    border-radius: 12px;         /* Rounded corners */
    box-shadow: 0 8px 20px rgba(0,0,0,0.15); /* Soft shadow */
    font-family: 'Helvetica', Arial, sans-serif;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover effect on form container */
#sas-auth-form:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.25);
}

/* Row wrapper for side-by-side fields */
#sas-auth-form .sas-row {
    display: flex;
    gap: 15px; /* horizontal space between fields */
    flex-wrap: wrap; /* stack on small screens */
    margin-bottom: 15px; /* vertical spacing same as other fields */
}

/* Half-width fields in the row */
#sas-auth-form .sas-row input {
    flex: 1; /* equal width */
    min-width: 45%; /* ensure it doesn’t get too small on mobile */
    margin-bottom: 0; /* row itself has bottom margin, so no extra on individual fields */
}

/* Buttons for toggle */
#sas-auth-form > button {
    background-color: #0073aa; /* WordPress blue */
    color: #fff;
    border: none;
    padding: 10px 18px;
    margin: 5px 5px 15px 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#sas-auth-form > button:hover {
    background-color: #005177;
}

/* Input fields */
#sas-auth-form input[type="text"],
#sas-auth-form input[type="email"],
#sas-auth-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px; /* consistent spacing */
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#sas-auth-form input[type="text"]:focus,
#sas-auth-form input[type="email"]:focus,
#sas-auth-form input[type="password"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 8px rgba(0,115,170,0.2);
    outline: none;
}

/* Dropdown */
#sas-auth-form select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px; /* same spacing as inputs */
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    cursor: pointer;
}

#sas-auth-form select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 8px rgba(0,115,170,0.2);
    outline: none;
}

/* Submit buttons */
#sas-auth-form input[type="submit"] {
    background-color: #2b6cb0;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#sas-auth-form input[type="submit"]:hover {
    background-color: #002856;
    transform: translateY(-2px);
}

/* Hide and show forms */
#reg-form, #login-form {
    display: none;
}

/* Headings */
#sas-auth-form h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.sas-success::before {
    content: '✔';
    font-weight: bold;
    color: #27ae60;
    margin-right: 5px;
}

.sas-error::before {
    content: '✖';
    font-weight: bold;
    color: #d32f2f;
    margin-right: 5px;
}

.sas-warning::before {
    content: '⚠';
    font-weight: bold;
    color: #f9a825;
    margin-right: 5px;
}

/* Container & Card */
.qnie-approval-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    font-family: Helvetica, Arial, sans-serif;
}

.qnie-approval-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

/* Tabs */
.qnie-tabs {
    display: flex;
    flex-wrap: nowrap; /* Prevent wrapping to second row */
    overflow-x: auto;  /* Allow horizontal scroll if needed */
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.qnie-tab {
    flex: 1; /* Each tab takes equal width */
    padding: 10px 20px;
    cursor: pointer;
    background: #f5f5f5;
    margin-right: 5px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    transition: all 0.2s;
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap; /* Keep text on one line */
}

.qnie-tab.active {
    background: #2b6cb0;
    color: #fff;
    border-bottom: 2px solid #fff;
}

.qnie-tab.completed {
    border-bottom: 3px solid #0a1f44; /* same as active */
    color: #0a1f44;
    opacity: 0.7; /* slightly lighter to show completed */
}

/* Form Fields */
.qnie-tab-form label {
    display: block;
    margin-bottom: 5px;
    margin-top: 15px;
    font-size: 14px;
    color: #333;
}

.qnie-tab-form input:not([type="radio"]):not([type="checkbox"]),
.qnie-tab-form select,
.qnie-tab-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.qnie-tab-form textarea {
    resize: vertical;
}

/* Form Navigation Buttons */
.form-nav {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-nav button {
    background-color: #2b6cb0;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.2s;
}

.form-nav button:hover {
    background-color: #002856;
}

/* Hide inactive tab content */
.qnie-tab-content {
    display: none;
}

.qnie-tab-content.active {
    display: block;
}

/* Grid Layouts */
.qnie-tab-content > div,
.qnie-three-column-row,
.custom-select-wrapper {
    margin-bottom: 12px;
}

.qnie-three-column-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.qnie-bank-details, .declaration-label {
    background: #f0f4f8; /* light background */
    padding: 15px;
    border: 1px solid #d1d9e0;
    border-radius: 8px;
    margin-bottom: 15px;
    margin-top: 30px;
    font-size: 14px;
    line-height: 1.5;
    font-size: 14px;
}

/* Disabled fields styling */
.sas-quality-tab select:disabled,
.sas-quality-tab textarea:disabled,
.sas-quality-tab input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Optional: also make label lighter */
.sas-quality-tab .field-disabled label {
    color: #999;
}

.field-disabled label {
    color: #999;
}

#privacy-modal {
    position: fixed;
    top:0; left:0; right:0; bottom:0;
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:1000;
}
#privacy-modal .modal-overlay {
    position:absolute;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.5);
}
#privacy-modal .modal-content {
    position:relative;
    background:#fff;
    padding:20px;
    border-radius:8px;
    z-index:1001;
    max-width:400px;
    width:90%;
    text-align:center;
}
#privacy-modal .modal-content p, ol {
    text-align:left !important;
}

#declaration_checkbox {
    vertical-align: middle;
}

label[for="declaration_checkbox"] {
    display: inline-block;
    margin-left: 6px;
}

.qnie-success-message {
    width:50%; 
    margin:20px auto; 
    padding:15px; 
    background:#d4edda; 
    color:#155724; 
    border:1px solid #c3e6cb; 
    text-align:center; 
    font-weight:bold;
}
.qnie-warning-message {
    width:50%; 
    margin:50px auto; 
    padding:20px; 
    background:#f9f9f9; 
    text-align:center; 
    font-size:18px; 
    border:1px solid #ccc;
}

.qnie-review-table {
    width: 100%;
    table-layout: fixed; /* Makes columns equal width */
    font-size: 14px;
}

.qnie-review-table th:first-child {
    width: 40%; /* Field column */
}

.qnie-review-table td:first-child {
    width: 40%; /* Field column */
}

.qnie-review-table th:last-child {
    width: 60%; /* Value column */
}

.qnie-review-table td:last-child {
    width: 60%; /* Value column */
}

.qnie-review-table td,
.qnie-review-table th {
    word-wrap: break-word;
}

.qnie-review-table-tr {
    background-color: #2b6cb0;
    color: white;
}

.table-subheading {
    background:#d9edf7;
    font-weight:bold; 
    text-align:left;
}

.qnie-declaration-actions .qnie-approve { background-color: #28a745; }
.qnie-declaration-actions .qnie-reject { background-color: #dc3545; }
.qnie-declaration-actions .qnie-request-resubmission { background-color: #fd7e14; }

.qnie-declaration-actions .qnie-btn {
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}

/* Modal overlay */
#qnie-resubmit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
}

/* Modal content box */
#qnie-resubmit-modal > div {
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    width: 500px;
    max-height: 80vh; /* limit height */
    overflow-y: auto;  /* scroll if content exceeds height */
    margin: 80px auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Modal title */
#qnie-resubmit-modal h4,
#qnieRejectModal {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

/* Each section */
.qnie-section {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
}

/* Section header */
.qnie-section-toggle {
    font-size: 14px;        /* smaller font */
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
    color: #333;
}

/* Field labels inside section */
.qnie-section-fields label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    cursor: pointer;
}

/* Reason textarea */
.qnie-field-reason,
#qnieRejectReason {
    width: 100%;
    padding: 5px;
    font-size: 13px;
    margin-bottom: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

/* Modal buttons */
#qnie-resubmit-cancel,
#qnie-resubmit-submit, 
#qnieConfirmReject,
#qnieCancelReject {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

#qnie-resubmit-cancel,
#qnieCancelReject {
    background: #ccc;
    color: #000;
    margin-right: 5px;
}

#qnie-resubmit-submit,
#qnieConfirmReject {
    background: #0073aa;
    color: #fff;
}

#qnie-resubmit-cancel:hover,
#qnieCancelReject:hover {
    background: #999;
}

#qnie-resubmit-submit:hover,
#qnieConfirmReject:hover {
    background: #005f8d;
}


@media screen and (max-width: 768px) {
    .qnie-three-column-row {
        grid-template-columns: 1fr;
    }

    .qnie-tabs {
        flex-direction: column;
    }

    .qnie-tab {
        margin-bottom: 5px;
    }
}

/* Mobile accordion behavior */
@media screen and (max-width: 768px) {

    .qnie-tabs {
        display: block;  /* Stack tabs vertically */
        border-bottom: none;
    }

    .qnie-tab {
        display: block;
        width: 100%;
        margin-bottom: 5px;
        border-radius: 5px;
        background: #f5f5f5;
        padding: 12px 15px;
        position: relative;
    }

    /* Hide all tab contents by default on mobile */
    .qnie-tab-content {
        display: none;
        padding: 10px 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        margin-bottom: 10px;
    }

    /* Show content only under active tab */
    .qnie-tab.active + .qnie-tab-content {
        display: block;
    }
}



