/**
 * Public-facing CSS for the plugin
 *
 * @link       https://example.com
 * @since      1.0.0
 *
 * @package    Student_Id_Card_QR_Attendance
 * @subpackage Student_Id_Card_QR_Attendance/public/css
 */

/* Common styles */
profile-picture .profile-image {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    transition: border-color 0.3s ease;
}

.student-profile-picture .profile-image:hover {
    border-color: #0073aa;
}

.student-profile-picture .profile-placeholder {
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: bold;
    color: #666;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.student-profile-picture .profile-placeholder:hover {
    background-color: #e0e0e0;
    border-color: #0073aa;
}

.student-profile-picture .profile-name {
    margin-top: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.student-profile-picture.no-profile-picture .profile-image {
    display: none;
}

.student-profile-picture-error {
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
    font-size: 14px;
}

/* Responsive profile picture */
@media (max-width: 480px) {

    .student-profile-picture .profile-image,
    .student-profile-picture .profile-placeholder {
        max-width: 100px;
        max-height: 100px;
    }

    .student-profile-picture .profile-name {
        font-size: 12px;
    }
}

/* Practical Attendance Styles */
.qr-scan-practical-attendance {
    margin-top: 25px;
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.qr-scan-practical-attendance h4 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: #2271b1;
    font-size: 18px;
    font-weight: 600;
}

#practical-attendance-content {
    padding: 10px 0;
}

.practical-day-item {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.practical-day-header h5 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.practical-date {
    color: #666;
    font-size: 14px;
    font-weight: normal;
}

.practical-description {
    margin: 5px 0 10px 0;
    color: #666;
    font-size: 13px;
    font-style: italic;
}

.practical-day-attendance {
    margin: 10px 0;
    padding: 10px;
    background-color: white;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.practical-checkbox-label,
.practical-session-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.practical-checkbox-label:hover,
.practical-session-label:hover {
    background-color: #f0f0f0;
}

.practical-checkbox-label input[type="checkbox"],
.practical-session-label input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.practical-checkbox-label input[type="checkbox"]:disabled,
.practical-session-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.checkbox-text {
    flex: 1;
    color: #333;
    font-size: 14px;
}

.marked-badge {
    background-color: #00a32a;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.marked-badge-small {
    background-color: #00a32a;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 10px;
}

.practical-sessions {
    margin-top: 15px;
    padding: 12px;
    background-color: white;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: opacity 0.3s, pointer-events 0.3s;
}

.practical-sessions h6 {
    margin: 0 0 10px 0;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.practical-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.practical-save-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f0f6fc;
    border: 1px solid #d0e3f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

#save-practical-attendance {
    background-color: #2271b1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}

#save-practical-attendance:hover {
    background-color: #135e96;
}

#save-practical-attendance:disabled {
    background-color: #a0a5aa;
    cursor: not-allowed;
}

#practical-attendance-status {
    flex: 1;
    text-align: right;
    min-width: 200px;
}

.status-info {
    color: #0c5460;
    background-color: #d1ecf1;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
}

/* Responsive adjustments for practical attendance */
@media (max-width: 600px) {
    .practical-day-item {
        padding: 12px;
    }

    .practical-save-section {
        flex-direction: column;
        align-items: stretch;
    }

    #save-practical-attendance {
        width: 100%;
    }

    #practical-attendance-status {
        text-align: center;
    }

    .practical-checkbox-label,
    .practical-session-label {
        padding: 6px 8px;
    }

    .checkbox-text {
        font-size: 13px;
    }
}

id-card-login-required,
.student-id-card-error {
    padding: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

/* ID Card styles */
.student-id-card-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 750px;
    margin: 0 auto;
    padding: 20px 0;
}

.student-id-card {
    position: relative;
    width: 340px;
    /* Exact width as requested */
    margin: 0 auto;
    height: 220px;
    /* Exact height as requested */
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 12px;
    padding-left: 20px;
    box-sizing: border-box;
    border: 1px solid #eaeaea;
}

.id-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 6px;
    width: 100%;
}

.id-card-header-left {
    flex: 0 0 100px;
    text-align: left;
}

.id-card-header-right {
    flex: 1;
    text-align: center;
    /* No padding needed with inline style */
}

.id-card-logo {
    height: 30px;
    max-width: 100px;
    object-fit: contain;
    flex-shrink: 0;
}

.id-card-title {
    margin: 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.id-card-body {
    display: flex;
    flex: 1;
    margin-bottom: 6px;
    align-items: flex-start;
    /* Align items to the top */
}

.id-card-photo-container {
    width: 75px;
    height: 75px;
    /* 1:1 aspect ratio */
    overflow: hidden;
    border-radius: 4px;
    background-color: #f9f9f9;
    border: 1px solid #eeeeee;
    margin-left: 4px;
    margin-top: 0;
    /* Align to top */
}

.id-card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.id-card-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.id-card-photo-icon:before {
    content: '\f110';
    font-family: dashicons;
    font-size: 24px;
    color: #bbb;
}

.id-card-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 2px;
    /* Adjust for alignment */
}

.id-card-field {
    margin-bottom: 6px;
    font-size: 12px;
}

.id-card-label {
    font-weight: 600;
    color: #555;
    display: inline-block;
    min-width: 65px;
}

.id-card-value {
    color: #333;
}

.id-card-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Align to top */
    margin-top: 0;
    margin-right: 10px;
    /* Align to top */
}

/* IMPROVED QR CODE STYLES FOR CRISP RENDERING */
#student-qr-code {
    padding: 2px;
    background-color: white;
    border-radius: 3px;
    border: 1px solid #f0f0f0;
    /* Control QR code size */
    width: 75px;
    /* Match photo width */
    height: 75px;
    /* Match photo height */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    /* Critical for crisp QR codes */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

#student-qr-code img,
#student-qr-code canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    max-width: 100%;
    max-height: 100%;

    /* Ensure sharp rendering at any scale */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    -ms-interpolation-mode: nearest-neighbor;
}

.id-card-qr-text {
    font-size: 9px;
    color: #777;
    margin-top: 2px;
    text-align: center;
}

.id-card-footer {
    text-align: center;
    font-size: 10px;
    color: #888;
    margin-top: 6px;
    border-top: 1px solid #f0f0f0;
    padding-top: 5px;
}

/* Upload form styles */
.student-id-card-upload-container {
    max-width: 650px;
    margin: 20px auto;
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #eaeaea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.student-id-card-upload-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.upload-note {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.upload-form-group {
    margin-bottom: 20px;
}

.upload-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.upload-file-input {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    background-color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-file-input:hover {
    border-color: #2271b1;
    background-color: #f8f9fa;
}

.upload-file-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.upload-form-actions {
    margin-top: 15px;
}

.upload-form-actions .button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.upload-form-actions .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.upload-status {
    margin-top: 15px;
    min-height: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.success-message {
    padding: 10px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 4px;
    margin: 10px 0;
}

.error-message {
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin: 10px 0;
}

.info-message {
    padding: 10px;
    background-color: #d1ecf1;
    color: #0c5460;
    border-radius: 4px;
    margin: 10px 0;
}

/* ID card actions */
.student-id-card-actions {
    text-align: center;
    margin: 20px 0;
}

/* QR Scanner styles */
.student-qr-scanner-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.qr-scanner-header {
    text-align: center;
    margin-bottom: 20px;
}

.scanner-instruction {
    color: #666;
}

/* Manual Student Search Styles */
.manual-student-search {
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.manual-student-search h3 {
    margin: 0 0 10px;
    color: #2271b1;
    font-size: 18px;
    font-weight: 600;
}

.search-instruction {
    color: #666;
    font-size: 14px;
    margin: 0 0 15px;
}

.search-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.student-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.student-search-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.search-button {
    padding: 10px 20px;
    background-color: #2271b1;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.search-button:hover {
    background-color: #135e96;
}

.search-button:disabled {
    background-color: #a0a5aa;
    cursor: not-allowed;
}

.search-status {
    min-height: 24px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    transition: all 0.3s ease;
}

.search-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.search-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive adjustments for manual search */
@media (max-width: 600px) {
    .manual-student-search {
        padding: 15px;
    }

    .search-input-container {
        flex-direction: column;
    }

    .search-button {
        width: 100%;
    }
}

.qr-scanner-body {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.qr-scanner-area {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 400px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .qr-scanner-body {
        flex-wrap: nowrap;
    }

    .qr-scanner-area {
        flex: 1;
    }

    .qr-scan-result {
        flex: 1;
    }
}

#qr-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.qr-scanner-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.3);
}

.qr-scanner-status {
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.5);
}

.qr-scanner-status.error {
    background-color: rgba(220, 53, 69, 0.7);
}

.qr-scanner-status.success {
    background-color: rgba(40, 167, 69, 0.7);
}

.qr-scanner-controls {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
}

.camera-select {
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.qr-scan-result {
    flex: 1;
    min-width: 300px;
    min-height: 400px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: auto;
}

.qr-scan-result-inner {
    padding: 20px;
}

.qr-scan-result-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 360px;
    color: #888;
    text-align: center;
    font-style: italic;
}

.qr-scan-error {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* User profile in scan result */
.qr-scan-user-profile {
    padding-bottom: 20px;
}

.qr-scan-user-header {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.qr-scan-user-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #f0f0f0;
    margin-right: 15px;
}

.qr-scan-user-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-scan-user-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.qr-scan-user-photo-placeholder:before {
    content: '\f110';
    font-family: dashicons;
    font-size: 30px;
    color: #bbb;
}

.qr-scan-user-info h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #333;
}

.qr-scan-user-info p {
    margin: 5px 0;
    color: #666;
}

/* Attendance section */
.qr-scan-attendance {
    margin-bottom: 20px;
}

.qr-scan-attendance h4 {
    margin-top: 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.qr-scan-attendance-months {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.qr-scan-attendance-month {
    flex: 1;
    min-width: 200px;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 10px;
}

.qr-scan-attendance-month h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #555;
    text-align: center;
}

.qr-scan-attendance-weeks {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.qr-scan-attendance-week {
    padding: 5px;
    border-radius: 3px;
}

.qr-scan-attendance-week:nth-child(odd) {
    background-color: #f9f9f9;
}

.qr-scan-attendance-checkbox {
    margin-right: 5px;
}

/* Orders section */
.qr-scan-orders h4 {
    margin-top: 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.qr-scan-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.qr-scan-orders-table th,
.qr-scan-orders-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.qr-scan-orders-table th {
    background-color: #f9f9f9;
    color: #555;
    font-weight: 600;
}

.qr-scan-orders-table tr:last-child td {
    border-bottom: none;
}

.order-status {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
    background-color: #eee;
}

.status-completed {
    background-color: #c3e6cb;
    color: #155724;
}

.status-processing {
    background-color: #bee5eb;
    color: #0c5460;
}

.status-on-hold {
    background-color: #ffeeba;
    color: #856404;
}

.status-pending {
    background-color: #f5c6cb;
    color: #721c24;
}

.qr-scan-no-orders {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    color: #666;
    text-align: center;
}

/* Responsive fixes */
@media (max-width: 767px) {
    .student-id-card {
        /* Maintain exact dimensions */
        width: 360px;
        height: 220px;
        /* Scale the container if screen is too small */
        transform-origin: top center;
    }

    .id-card-qr-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        /* Align to top */
        margin-top: 0;
        margin-right: 20px;
        /* Align to top */
    }

    /* Ensure QR code maintains square aspect ratio on mobile with enhanced quality */
    #student-qr-code {
        width: 75px;
        height: 75px;
        min-width: 75px;
        min-height: 75px;
        max-width: 75px;
        max-height: 75px;
        aspect-ratio: 1/1;

        /* Enhanced rendering for mobile */
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transform: translateZ(0);
    }

    #student-qr-code img,
    #student-qr-code canvas {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
        aspect-ratio: 1/1;
    }

    /* If the screen is really small, scale down the card */
    @media (max-width: 400px) {
        .student-id-card {
            transform: scale(0.9);
            margin-bottom: 15px;
        }
    }

    /* For extremely small screens */
    @media (max-width: 340px) {
        .student-id-card {
            transform: scale(0.8);
            margin-bottom: 25px;
        }
    }

    .qr-scan-attendance-months {
        flex-direction: column;
    }
}

/* Attendance Actions Styles */
.qr-scan-attendance-actions {
    margin-top: 15px;
    text-align: right;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.attendance-status {
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    min-width: 120px;
}

.status-ready {
    color: #555;
}

.status-saving {
    color: #856404;
    background-color: #fff3cd;
    padding: 5px 10px;
    border-radius: 4px;
    animation: pulse 1.5s infinite;
}

.status-success {
    color: #155724;
    background-color: #d4edda;
    padding: 5px 10px;
    border-radius: 4px;
}

.status-error {
    color: #721c24;
    background-color: #f8d7da;
    padding: 5px 10px;
    border-radius: 4px;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

/* Product Payment Checker Styles */
.product-payment-checker-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.product-checker-header {
    text-align: center;
    margin-bottom: 30px;
}

.product-checker-header h2 {
    margin: 0 0 10px;
    color: #333;
}

.checker-instruction {
    color: #666;
    font-size: 14px;
}

.product-checker-body {
    padding: 0;
}

.product-student-search {
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.product-student-search h3 {
    margin: 0 0 10px;
    color: #2271b1;
    font-size: 18px;
    font-weight: 600;
}

.product-student-search .search-instruction {
    color: #666;
    font-size: 14px;
    margin: 0 0 15px;
}

.product-checker-scanner-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.product-status-result {
    flex: 1;
    min-width: 300px;
    min-height: 400px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: auto;
}

.product-status-result-inner {
    padding: 20px;
}

.product-status-result-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    color: #888;
    text-align: center;
    font-style: italic;
}

.product-status-error {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Product Status Display */
.product-status-display {
    padding: 10px 0;
}

.product-status-user-info {
    margin-bottom: 20px;
}

.product-status-user-info h3 {
    margin: 0 0 10px;
    color: #333;
    font-size: 22px;
}

.product-status-user-info p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.product-status-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 20px 0;
}

.product-status-info {
    margin-bottom: 20px;
}

.product-status-info h4 {
    margin: 0 0 12px;
    color: #2271b1;
    font-size: 18px;
}

.product-name,
.product-id {
    margin: 8px 0;
    font-size: 14px;
    color: #333;
}

/* Payment Status Display */
.payment-status-display {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.payment-status-display .status-icon {
    font-size: 48px;
    margin-right: 20px;
    font-weight: bold;
}

.payment-status-display .status-info {
    flex: 1;
}

.payment-status-display .status-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.payment-status-display .status-value {
    font-size: 24px;
    font-weight: bold;
}

/* Status variants */
.payment-status-display.status-paid {
    background-color: #d4edda;
    border: 2px solid #c3e6cb;
}

.payment-status-display.status-paid .status-icon {
    color: #155724;
}

.payment-status-display.status-paid .status-value {
    color: #155724;
}

.payment-status-display.status-on-hold {
    background-color: #fff3cd;
    border: 2px solid #ffeaa7;
}

.payment-status-display.status-on-hold .status-icon {
    color: #856404;
}

.payment-status-display.status-on-hold .status-value {
    color: #856404;
}

.payment-status-display.status-not-paid {
    background-color: #f8d7da;
    border: 2px solid #f5c6cb;
}

.payment-status-display.status-not-paid .status-icon {
    color: #721c24;
}

.payment-status-display.status-not-paid .status-value {
    color: #721c24;
}

/* Order Details */
.order-details {
    padding: 15px;
    background-color: #f0f6fc;
    border-radius: 6px;
    margin-top: 15px;
}

.order-details h4 {
    margin: 0 0 10px;
    color: #2271b1;
    font-size: 16px;
}

.order-details p {
    margin: 8px 0;
    color: #333;
    font-size: 14px;
}

.order-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.order-status-badge.status-paid {
    background-color: #c3e6cb;
    color: #155724;
}

.order-status-badge.status-on-hold {
    background-color: #ffeaa7;
    color: #856404;
}

/* Responsive adjustments for product checker */
@media (min-width: 768px) {
    .product-checker-scanner-section {
        flex-wrap: nowrap;
    }

    #product-qr-reader {
        flex: 1;
    }

    .product-status-result {
        flex: 1;
    }
}

@media (max-width: 767px) {
    .product-checker-scanner-section {
        flex-direction: column;
    }

    .product-student-search {
        padding: 15px;
    }

    .product-status-result-inner {
        padding: 15px;
    }

    .payment-status-display {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .payment-status-display .status-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .product-status-user-info h3 {
        font-size: 18px;
    }
}

/* Practical Attendance Scanner Only Styles */
.practical-attendance-scanner-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.practical-scanner-header {
    text-align: center;
    margin-bottom: 20px;
}

.practical-scanner-header h2 {
    margin: 0 0 10px;
    color: #333;
}

.practical-scanner-body {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.practical-scan-result {
    flex: 1;
    min-width: 300px;
    min-height: 400px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: auto;
}

.practical-scan-result-inner {
    padding: 20px;
}

.practical-scan-result-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 360px;
    color: #888;
    text-align: center;
    font-style: italic;
}

/* Practical Only User Profile */
.practical-only-user-profile {
    padding-bottom: 20px;
}

.practical-only-user-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.practical-only-user-info h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #333;
}

.practical-only-user-info p {
    margin: 5px 0;
    color: #666;
}

.practical-only-attendance h4 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: #2271b1;
    font-size: 18px;
    font-weight: 600;
}

#practical-only-attendance-content {
    padding: 10px 0;
}

/* Responsive adjustments for practical scanner */
@media (min-width: 768px) {
    .practical-scanner-body {
        flex-wrap: nowrap;
    }

    .qr-scanner-area {
        flex: 1;
    }

    .practical-scan-result {
        flex: 1;
    }
}

@media (max-width: 767px) {
    .practical-scanner-body {
        flex-direction: column;
    }
}

/* Profile Picture Shortcode Styles */
.student-profile-picture {
    display: inline-block;
    text-align: center;
    margin: 10px 0;
}

.student-

/* Payment Status Banner - Modern Design */
.payment-status-banner {
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: none;
    position: relative;
    overflow: hidden;
    background: #fff;
    border-left: 5px solid #22c55e;
}

.payment-status-banner.paid {
    background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 100%);
    color: #166534;
    border-left-color: #22c55e;
}

.payment-status-banner.not-paid {
    background: linear-gradient(145deg, #ffffff 0%, #fef2f2 100%);
    color: #991b1b;
    border-left-color: #ef4444;
}

.payment-status-banner.on-hold {
    background: linear-gradient(145deg, #ffffff 0%, #fffbeb 100%);
    color: #92400e;
    border-left-color: #f59e0b;
}

.payment-status-banner .status-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.payment-status-banner.paid .status-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.payment-status-banner.not-paid .status-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.payment-status-banner.on-hold .status-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.payment-status-banner .status-details {
    flex: 1;
}

.payment-status-banner .status-details>div:first-child {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.payment-status-banner .status-details .product-name {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 2px;
}

.payment-status-banner .status-details .order-info {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.7;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    display: inline-block;
    margin-top: 8px;
}

.payment-blocked-message {
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 100%);
    border: none;
    color: #92400e;
    padding: 14px 20px;
    border-radius: 12px;
    margin-top: 12px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.practical-attendance-blocked {
    opacity: 0.5;
    pointer-events: none;
}

/* Book Collect Section Styles - Modern Design */
.book-collect-section {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 20px 24px;
    background: linear-gradient(145deg, #ffffff 0%, #eff6ff 100%);
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.12);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.book-collect-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
}

.book-collect-section:hover {
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.18);
    transform: translateY(-1px);
}

.book-collect-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.book-collect-label {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    font-weight: 500;
    color: #1e40af;
    flex: 1;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.book-collect-label:hover {
    color: #1d4ed8;
}

/* Custom Toggle Switch Style */
.book-collect-checkbox {
    -webkit-appearance: none;
    appearance: none;
    width: 52px;
    height: 28px;
    background: #e2e8f0;
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.book-collect-checkbox::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.book-collect-checkbox:checked {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.book-collect-checkbox:checked::before {
    left: 27px;
}

.book-collect-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.book-collect-checkbox:disabled:checked {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.book-collect-label .checkbox-text {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.book-collect-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.35);
    animation: badgePop 0.3s ease;
}

@keyframes badgePop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.book-collect-loading {
    font-size: 13px;
    color: #64748b;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
}

.book-collect-loading::before {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}