/* Gallery Upload Specific Styles */

.gallery-gradient-text {
    background: var(--gradient-3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 5px;
    line-height: 1.2;
}

#btn-home {
    padding: 10px 24px !important;
    margin-right: 15px;
    margin-top: 5px;
    box-shadow: 0 4px 12px rgba(40, 106, 205, 0.2);
    transition: all 0.3s ease;
}

#btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(40, 106, 205, 0.3);
}

.upload-section {
    width: 100%;
    max-width: 1000px;
}

.upload-card {
    padding: 40px;
    border-radius: 32px;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: start;
}

@media (min-width: 992px) {
    .upload-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.polaroid-wrapper {
    width: 100%;
}

@media (max-width: 991px) {
    .upload-card {
        padding: 20px;
        border-radius: 18px;
    }

    .upload-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .preview-section {
        order: -1;
        background: #ffffff;
        padding: 0;
        width: 100%;
        /* Match form card width instead of full screen */
        max-height: 350px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        border-bottom: 1px solid rgba(226, 232, 240, 0.8);
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        overflow: hidden;
    }

    .form-section {
        align-self: center;
        /* background: #f8fafc; */
    }

    .main-container {
        margin-top: 0 !important;
        padding-top: 70px !important;
    }

    .navbar.scrolled~.main-container .preview-section {
        top: 50px;
    }

    .polaroid-interactive-preview {
        width: 100% !important;
        max-width: 220px;
        /* Reduced from 250px */
        height: auto !important;
        aspect-ratio: 4 / 6;
        margin: 0 auto !important;
        transform: none !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border: 2px solid white;
    }

    .preview-hint {
        display: block;
        margin-top: 5px !important;
        font-size: 0.75rem;
        color: #64748b;
    }

    #btn-home {
        margin-right: 0;
        padding: 8px 18px !important;
    }
}

.section-desc {
    color: #718096;
    margin-bottom: 12px;
    font-size: 0.7rem;
}

/* Form Styles */
.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #4A5568;
    font-size: 0.8rem;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    background: white;
    font-size: 0.9rem;
    color: #2D3748;
    transition: all 0.2s;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: #CBD5E0;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--mariner-blue);
    box-shadow: 0 0 0 3px rgba(40, 106, 205, 0.1);
}

.char-count {
    position: absolute;
    right: 5px;
    bottom: -18px;
    font-size: 0.75rem;
    color: #A0AEC0;
}

/* Quota Badge */
.quota-badge {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 12px;
    background: linear-gradient(135deg, #EBF5FF 0%, #F0F7FF 100%);
    border: 1px solid #BEE3F8;
    margin-bottom: 24px;
    font-size: 0.7rem;
    color: #2B6CB0;
    font-weight: 500;
}

.quota-badge-success {
    justify-content: center;
    margin-bottom: 20px;
}

.quota-badge .quota-icon {
    font-size: 0.9rem;
}

.quota-badge strong {
    font-size: 1.3rem;
    color: #2B6CB0;
}

.quota-badge.quota-exhausted {
    background: linear-gradient(135deg, #FFF5F5 0%, #FEF2F2 100%);
    border-color: #FEB2B2;
    color: #C53030;
}

.quota-badge.quota-exhausted strong {
    color: #C53030;
}


/* Upload Area */
.upload-area {
    width: 100%;
    height: 50px;
    border: 2px dashed #CBD5E0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.5);
}

.upload-area:hover {
    border-color: var(--mariner-blue);
    background: rgba(40, 106, 205, 0.05);
}

.upload-area.has-image {
    border-style: solid;
    border-color: var(--mariner-blue);
    background: rgba(40, 106, 205, 0.05);
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.upload-area p {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 500;
}

/* Polaroid Preview */
/* Polaroid Interactive Preview */
/* Navbar & Submit Relocation */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1000;
    border-radius: 0 !important;
    transform: none !important;
    /* Force reset global floating transform */
    transition: none;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    height: 50px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    width: 100% !important;
    max-width: none !important;
    /* Spans full screen */
    margin: 0 !important;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-navbar-submit {
    background: var(--gradient-3);
    color: white;
    border: none;
    padding: 8px 22px;
    /* Reduced from 10px 28px */
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    /* Reduced from 0.95rem */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(40, 106, 205, 0.25);
}

.btn-submit-full {
    width: 100%;
    background: var(--gradient-3);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(40, 106, 205, 0.3);
    margin-top: 25px;
}

.btn-submit-full:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(40, 106, 205, 0.4);
    filter: brightness(1.1);
}

.btn-submit-full:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit-full:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

.home-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 4px 0;
}

.home-link:hover {
    transform: scale(1.05);
}

.home-icon {
    font-size: 1.2rem;
    opacity: 0.8;
}

.preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* top: 90px; */
    /* Align with new gap */
    background: #ffffff;
    padding: 30px 0;
    width: 100%;
    /* Aligned with form card */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px;
    overflow: hidden;
}

.main-container {
    margin-top: 0 !important;
    padding-top: 90px !important;
}

.navbar.scrolled~.main-container .preview-section {
    top: 70px;
}

.polaroid-wrapper {
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50%;
}

.polaroid-interactive-preview {
    background: #f1f5f9;
    width: 320px;
    /* Reduced from 380px for better visibility */
    height: 480px;
    /* Reduced from 570px (4:6 ratio) */
    border-radius: 12px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px dashed transparent;
}

.polaroid-interactive-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.18);
    border-color: var(--mariner-blue);
}

.polaroid-interactive-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: white;
}

/* Character Count and Labels */

#preview-desc-text {
    font-size: 16px;
    color: black;
    line-height: 1.3;
    font-family: 'CS Prajad', 'Noto Sans Thai', cursive;
    height: 44px;
    /* Space for 2 lines */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 25px;
    /* Increased side padding */
    font-weight: bold;
    margin-bottom: 0;
}

#preview-desc-text.placeholder {
    color: #A0AEC0;
}

#preview-owner-text {
    display: none;
}

.preview-hint {
    margin-top: 10px;
    font-size: 0.5rem;
    color: #718096;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 24px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

/* Review Modal Adjustments */
#review-modal .modal-content {
    padding: 20px;
}

#review-modal h3 {
    font-size: 1.1rem;
}

#review-modal .section-desc {
    font-size: 0.8rem;
    margin-bottom: 15px;
}

#review-modal .modal-terms-container {
    padding: 10px;
    margin-bottom: 15px;
}

#review-modal .modal-terms-title {
    font-size: 0.75rem;
}

#review-modal .modal-terms-list li {
    font-size: 0.7rem;
    line-height: 1.3;
}

#review-modal .btn-blue,
#review-modal .btn-secondary {
    font-size: 0.9rem !important;
    padding: 10px !important;
}


.img-container {
    width: 100%;
    height: 350px;
    margin: 20px 0;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-secondary {
    background: #E2E8F0;
    color: #4A5568;
}

/* Loading Spinner */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

/* Disable styles */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* Zoom Preview Button */
.zoom-btn-wrapper {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 6px 15px;
    border-radius: 50px;
    background: rgba(40, 106, 205, 0.1);
    border: 1px solid var(--mariner-blue);
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--mariner-blue);
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

.zoom-btn-wrapper:hover {
    background: rgba(40, 106, 205, 0.15);
    transform: translateY(-2px);
}

/* Zoom Modal */
.zoom-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-modal-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.zoom-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 36px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: none;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
    z-index: 10;
    color: #333;
    line-height: 1;
}

.zoom-close-btn:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

/* Terms & Conditions Styles */
.terms-container {
    margin-top: 25px;
    padding: 15px;
    background: rgba(247, 250, 252, 0.8);
    border-radius: 12px;
    border: 1px solid #E2E8F0;
}

.terms-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4A5568;
    margin-bottom: 8px;
}

.terms-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terms-list li {
    font-size: 0.75rem;
    color: #718096;
    margin-bottom: 5px;
    padding-left: 15px;
    position: relative;
    line-height: 1.4;
}

.terms-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2b6cb0;
    font-weight: bold;
}

/* Modal Specific Terms */
.modal-terms-container {
    text-align: left;
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 3px solid #2b6cb0;
}

.modal-terms-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #2D3748;
    margin-bottom: 6px;
}

.modal-terms-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-terms-list li {
    font-size: 0.75rem;
    color: #4A5568;
    margin-bottom: 3px;
    padding-left: 12px;
    position: relative;
}

.modal-terms-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #38A169;
    font-size: 0.7rem;
}

/* Confirmation Checkbox */
.confirm-checkbox-container {
    margin-bottom: 20px;
    text-align: left;
    padding: 5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2b6cb0;
}

.checkbox-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2D3748;
}

/* Intro Section Styling */
#intro-section {
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInIntro 0.5s ease-out;
}

.intro-terms-box {
    text-align: left;
    background: rgba(255, 255, 255, 0.7);
    padding: 10px;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.intro-terms-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.intro-terms-list li {
    font-size: 0.95rem;
    color: #4A5568;
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    line-height: 1.6;
}

.intro-terms-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: #2b6cb0;
    font-weight: bold;
}

@keyframes fadeInIntro {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}