/* --- Plugin Form Wrapper --- */
.product-registration-form-wrap {
    margin: 20px auto;
    padding: 20px;
    background: #fff;
}

/* --- Two-Column Layout using Flexbox --- */
.pr-form-row {
    display: flex;
    gap: 20px; /* Space between the two columns */
    margin-bottom: 15px;
}
.pr-form-group {
    flex: 1 1 0; /* Ensures both columns take equal width */
    margin: 0; /* Reset default <p> margin */
    padding-left: 10px;
    padding-right: 10px;
}

.postbox-container .pr-form-group {
    margin: 15px 0;
}

/* --- Input Styling --- */
.pr-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}
.pr-form-group label::after {
    content: " *"; /* Add asterisk for required fields */
    color: red;
    display: none; /* Hide the generic asterisk, as it's added in the HTML label text */
}

.pr-form-group input[type="text"],
.pr-form-group input[type="email"],
.pr-form-group input[type="date"],
.pr-form-group select {
    width: 100%;
    padding: 3px 10px;
    border: 1px solid #ccc;
    box-sizing: border-box; /* Includes padding and border in the element's total width/height */
}
.pr-form-group input:focus,
.pr-form-group select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}


/* --- File Upload Styling (Custom look to match image) --- */
.pr-upload-group .pr-full-width {
    flex: 0 0 100%; /* Make this group span full width */
}
.pr-upload-note {
    display: block;
    margin-top: -10px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
}
.pr-custom-file-input {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    width: 100%;
    max-width: 400px; /* Set a reasonable max width for this element */
}
.pr-file-name {
    padding: 10px;
    flex-grow: 1;
    color: #555;
    background-color: #f9f9f9;
}
.pr-file-button {
    background-color: #0973bd; /* Light blue button color */
    color: white !important;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    border: none;
    border-left: 1px solid #0973bd;
    font-size: 14px;
    white-space: nowrap;
    margin-bottom: 0px !important;
}

/* --- Main Submit Button --- */
.pr-submit-button-wrap {
    margin-top: 30px;
    margin-bottom: 0;
    text-align: left; /* Aligns the button to the left */
}
.pr-submit-button {
    background-color: #3e72c8; /* Darker blue button color */
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.2s;
}
.pr-submit-button:hover {
    background-color: #315ca9;
}

/* Add to existing assets/css/style.css */

/* --- Adjust Select2 height to match standard inputs --- */
.select2-container--default .select2-selection--single {
    height: 40px !important; /* Match your input height of 10px padding + border */
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
}

form#registrations-filter .search-box {
    margin: 0 0 0 10px;
}

/* Style for the notice box */
#pr-form-notice {
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    border: 1px solid transparent;
    display: none; /* Hidden by default */
}

/* Loading Message Style */
#pr-form-notice.pr-notice-loading {
    display: block;
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

/* Success Message Style */
#pr-form-notice.pr-notice-success {
    display: block;
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

/* Error Message Style */
#pr-form-notice.pr-notice-error {
    display: block;
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

.pr-form-group input.pr-invalid, 
.pr-form-group select.pr-invalid {
    border-color: #dc3232; /* Red border */
    background-color: #fff8f8;
}

.pr-error-message {
    color: #dc3232;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* specific tweak for the file upload wrapper error */
.pr-upload-group .pr-error-message {
    margin-top: 8px;
}

/* --- Admin List Table Column Widths --- */

/* 1. Checkbox Column (Standard WP width) */
.wp-list-table .column-cb { 
    width: 2.2em; 
}

/* 2. Main Identifier Columns (Give them more space) */
.wp-list-table .column-name { 
    width: 10%; 
}
.wp-list-table .column-product_name { 
    width: 15%; 
}
.wp-list-table .column-email { 
    width: 13%; 
}

/* 3. Data Columns (Medium width) */
.wp-list-table .column-mobile { 
    width: 9%; 
}
.wp-list-table .column-purchase_date { 
    width: 9%; 
}
.wp-list-table .column-date_of_issue { 
    width: 8%; 
}
.wp-list-table .column-upload_by { 
    width: 9%; 
}

/* 4. Status & Action Columns (Smaller width) */
.wp-list-table .column-approval_status { 
    width: 9%; 
}
.wp-list-table .column-invoice_download { 
    width: 7%; 
}
.wp-list-table .column-certificate_download { 
    width: 7%; 
}

/* --- File Preview Modal Styles --- */
.pr-modal {
    display: none;
    position: fixed;
    z-index: 100000; /* Sit on top of everything, including WP admin bar */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.pr-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.75);
    backdrop-filter: blur(2px);
}

.pr-modal-content {
    position: relative;
    background-color: #fff;
    margin: 3% auto; /* Center vertically-ish */
    padding: 0;
    border-radius: 4px;
    width: 90%;
    max-width: 1100px;
    box-shadow: 0 15px 30px 0 rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Keep it within view */
}

.pr-modal-header {
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px 4px 0 0;
}

.pr-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.pr-modal-body {
    padding: 20px;
    background: #fff;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pr-modal-close {
    color: #777;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.pr-modal-close:hover {
    color: #d63638;
}

.pr-modal-footer {
    padding: 12px 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    text-align: right;
    border-radius: 0 0 4px 4px;
}

.pr-status-approved {
    color: #5cb85c;
}
.pr-status-pending {
    color: #f0ad4e
}
.pr-status-disapproved {
    color: #d9534f;
}

/* --- Mobile / Small Screen Adjustment --- */
@media (max-width: 768px) {
    .pr-form-row {
        flex-direction: column;
        gap: 0;
    }
}