/*
 * packaging-style.css
 * สไตล์ชีตโครงการบรรจุภัณฑ์อัจฉริยะ (Smart Packaging) ด้วยเทคโนโลยี NFC Tag
 * ธีมสีเขียวมรกต-ทอง (Emerald Green & Champagne Gold)
 * โรงเรียนบ้านน้ำพร สำนักงานเขตพื้นที่การศึกษาประถมศึกษาเลย เขต 1
 */

@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Sarabun:wght@300;400;500;600;700&display=swap');

:root {
    --pkg-primary: #065f46;
    --pkg-emerald: #059669;
    --pkg-mint: #10b981;
    --pkg-amber: #d97706;
    --pkg-gold: #f59e0b;
    --pkg-dark: #0f172a;
    --pkg-bg-light: #f0fdf4;
}

body {
    font-family: 'Prompt', 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #a7f3d0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Step Navigation Pills */
.step-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
}

.step-pill.active {
    background: linear-gradient(135deg, #065f46 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
    border-color: #047857;
}

.step-pill.completed {
    background-color: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.step-pill.completed:hover {
    background-color: #d1fae5;
}

.step-pill.pending {
    background-color: #ffffff;
    color: #64748b;
    border-color: #e2e8f0;
}

.step-pill.pending:hover {
    background-color: #f0fdf4;
    color: #065f46;
    border-color: #a7f3d0;
}

/* Lab Tab Buttons */
.lab-tab-btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 1rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.lab-tab-btn.active {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(6, 95, 70, 0.25);
    border: 1px solid #065f46;
}

.lab-tab-btn.inactive {
    background-color: #ffffff;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.lab-tab-btn.inactive:hover {
    background-color: #f0fdf4;
    color: #065f46;
    border-color: #a7f3d0;
}

/* Avatar Buttons in Login Card */
.avatar-btn {
    transition: all 0.2s ease;
}
.avatar-btn:hover {
    border-color: #059669 !important;
    background-color: #f0fdf4 !important;
    transform: scale(1.05);
}
.avatar-btn.selected {
    border-color: #059669 !important;
    background-color: #d1fae5 !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

/* NFC Wave Radar Animation */
@keyframes nfc-wave {
    0% {
        transform: scale(0.85);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.35);
        opacity: 0.4;
    }
    100% {
        transform: scale(1.7);
        opacity: 0;
    }
}

.animate-nfc-wave {
    animation: nfc-wave 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes float-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.animate-float {
    animation: float-slow 3s ease-in-out infinite;
}

/* Certificate Preview Styling (Emerald Green & Gold) */
.cert-container {
    background: #ffffff;
    border: 12px solid #065f46;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.cert-inner-border {
    border: 2px solid #d97706;
    margin: 6px;
    padding: 2.5rem;
    position: relative;
}

.cert-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: #d97706;
}
.cert-corner.top-left { top: -2px; left: -2px; border-top: 4px solid #d97706; border-left: 4px solid #d97706; }
.cert-corner.top-right { top: -2px; right: -2px; border-top: 4px solid #d97706; border-right: 4px solid #d97706; }
.cert-corner.bottom-left { bottom: -2px; left: -2px; border-bottom: 4px solid #d97706; border-left: 4px solid #d97706; }
.cert-corner.bottom-right { bottom: -2px; right: -2px; border-bottom: 4px solid #d97706; border-right: 4px solid #d97706; }

/* Certificate Canvas Container */
.cert-canvas-box {
    max-width: 100%;
    overflow-x: auto;
    border-radius: 1.5rem;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.15);
}

/* Print Stylesheet for A4 Landscape Certificate */
@media print {
    body * {
        visibility: hidden;
    }

    #cert-print-area, #cert-print-area * {
        visibility: visible;
    }

    #cert-print-area {
        position: fixed;
        left: 0;
        top: 0;
        width: 100vw;
        height: 100vh;
        margin: 0;
        padding: 0;
        background: #ffffff !important;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 99999;
    }

    .no-print {
        display: none !important;
    }
}

