/* ==========================================================================
   Rose-Gold Wedding Theme Stylesheet
   ========================================================================== */

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #faf6f0;
    color: #4a3433;
    font-family: var(--wedding-subtitle-font), 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header and Hero */
.gallery-header {
    padding: 40px 0 20px 0;
    border-bottom: 1px double #e5d1cd;
    margin-bottom: 40px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.language-switcher {
    display: flex;
    align-items: center;
}

.lang-btn {
    text-decoration: none;
    color: #8c716f;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 4px 8px;
    transition: color 0.3s ease;
}

.lang-btn.active {
    color: #c08b87;
    font-weight: 700;
}

.lang-divider {
    color: #e5d1cd;
    margin: 0 2px;
}

.admin-auth-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-badge {
    background-color: #f3e6e3;
    color: #8c716f;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid #e0c8c3;
}

.admin-login-link {
    color: #8c716f;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px dashed #8c716f;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.admin-login-link:hover {
    color: #c08b87;
    border-color: #c08b87;
}

/* Hero Title section */
.wedding-hero {
    text-align: center;
    padding: 30px 10px;
}

.wedding-title {
    font-family: var(--wedding-title-font);
    font-size: clamp(3rem, 10vw, 5.5rem);
    font-weight: 400;
    color: #7b4f4c;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
    line-height: 1.1;
}

.wedding-subtitle {
    font-family: var(--wedding-subtitle-font);
    font-size: clamp(0.95rem, 3vw, 1.25rem);
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #a48b89;
}

/* Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 25px;
    font-family: var(--wedding-subtitle-font);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-gold {
    background: linear-gradient(135deg, #dfc15d, #c5a059);
    color: #fff;
    box-shadow: 0 4px 10px rgba(197, 160, 89, 0.2);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(197, 160, 89, 0.35);
}

.btn-outline {
    background-color: transparent;
    color: #7b4f4c;
    border: 1px solid #c8b2af;
}

.btn-outline:hover {
    background-color: #fbf6f5;
    border-color: #7b4f4c;
}

.btn-submit {
    background-color: #c08b87;
    color: #fff;
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(192, 139, 135, 0.2);
}

.btn-submit:hover:not(:disabled) {
    background-color: #ae7874;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(192, 139, 135, 0.3);
}

.btn-submit:disabled {
    background-color: #d8c2c0;
    cursor: not-allowed;
}

/* Admin Dashboard Bar */
.admin-dashboard-panel {
    background-color: #f7edeb;
    border: 1px solid #eddcd9;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.panel-title {
    font-weight: 600;
    color: #7b4f4c;
}

.admin-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    text-decoration: none;
    color: #8c716f;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background-color: #fff;
    border: 1px solid #eddcd9;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-tab.active {
    background-color: #c08b87;
    color: #fff;
    border-color: #c08b87;
}

.badge-count {
    background-color: #a83f52;
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
}

/* Upload Card Section */
.upload-section {
    margin-bottom: 40px;
}

.section-card {
    background-color: #fff;
    border-radius: 16px;
    border: 1px solid #f2e6e3;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(123, 79, 76, 0.04);
}

.section-heading {
    text-align: center;
    font-family: var(--wedding-subtitle-font);
    font-weight: 500;
    color: #7b4f4c;
    margin-bottom: 24px;
    font-size: 1.4rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #8c716f;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e2d2d0;
    background-color: #fdfcfb;
    font-family: var(--wedding-subtitle-font);
    color: #4a3433;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #c08b87;
    box-shadow: 0 0 0 3px rgba(192, 139, 135, 0.15);
}

/* Drag and Drop Zone */
.drag-drop-area {
    border: 2px dashed #dca8a6;
    background-color: #fdfbfb;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.drag-drop-area:hover, .drag-drop-area.highlight-drag {
    border-color: #c08b87;
    background-color: #faf2f1;
}

.hidden-file-input {
    display: none;
}

.drag-drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: #dca8a6;
    margin-bottom: 12px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.drag-drop-area:hover .upload-icon {
    transform: translateY(-4px);
    color: #c08b87;
}

.drag-drop-main {
    font-size: 1rem;
    font-weight: 500;
    color: #7b4f4c;
    margin-bottom: 4px;
}

.drag-drop-sub {
    font-size: 0.85rem;
    color: #a48b89;
}

/* Previews before uploading */
.upload-preview-container {
    background-color: #faf5f4;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid #f2e2df;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #7b4f4c;
    margin-bottom: 12px;
    border-bottom: 1px solid #edd6d2;
    padding-bottom: 8px;
}

.btn-clear-preview {
    background: none;
    border: none;
    color: #a83f52;
    cursor: pointer;
    font-weight: 500;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e0c5c1;
    background-color: #e5d4d1;
}

.preview-media-wrapper {
    width: 100%;
    height: 100%;
}

.preview-media-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-icon-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #8c716f;
    color: #fff;
}

.preview-video-icon {
    width: 32px;
    height: 32px;
}

.preview-item-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: rgba(168, 63, 82, 0.85);
    color: #fff;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background-color 0.2s;
}

.preview-item-delete:hover {
    background-color: rgba(168, 63, 82, 1);
}

/* Gallery Filter Section */
.gallery-filters-section {
    margin-bottom: 30px;
}

.filters-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #8c716f;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-buttons {
    display: flex;
    background-color: #f0e4e2;
    border-radius: 20px;
    padding: 3px;
}

.filter-btn {
    text-decoration: none;
    color: #8c716f;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 17px;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background-color: #fff;
    color: #7b4f4c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.gallery-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f2e6e3;
    box-shadow: 0 4px 15px rgba(123, 79, 76, 0.02);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(123, 79, 76, 0.08);
}

.pinned-card {
    border: 2px solid #dfc15d;
    box-shadow: 0 4px 18px rgba(223, 193, 93, 0.15);
}

.pinned-card:hover {
    box-shadow: 0 12px 28px rgba(223, 193, 93, 0.25);
}

/* Pinned ribbon/badge */
.pinned-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #dfc15d;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pin-icon {
    width: 12px;
    height: 12px;
}

/* Media content container inside card */
.card-media-wrapper {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background-color: #f8f6f5;
}

.gallery-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-card:hover .gallery-media {
    transform: scale(1.05);
}

.video-thumbnail-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7b4f4c;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: background-color 0.3s, transform 0.3s;
}

.gallery-card:hover .video-play-overlay {
    background-color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon {
    width: 24px;
    height: 24px;
    margin-left: 2px;
}

/* Card details */
.card-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    background-color: #fff;
    border-top: 1px solid #faf5f4;
}

.guest-name {
    font-size: 0.85rem;
    color: #8c716f;
    margin-bottom: 12px;
}

.guest-name .highlight {
    font-weight: 600;
    color: #4a3433;
}

/* Admin Actions Inside Card Footer */
.admin-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    border-top: 1px dashed #f2e2df;
    padding-top: 12px;
}

.btn-mini {
    padding: 5px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--wedding-subtitle-font);
    font-weight: 600;
    border: 1px solid transparent;
    background: none;
    transition: all 0.2s ease;
}

.btn-approve {
    color: #2e7d32;
    background-color: #e8f5e9;
    border-color: #c8e6c9;
}

.btn-approve:hover {
    background-color: #c8e6c9;
}

.btn-disapprove {
    color: #e65100;
    background-color: #fff3e0;
    border-color: #ffe0b2;
}

.btn-disapprove:hover {
    background-color: #ffe0b2;
}

.btn-pin {
    color: #8c7f00;
    background-color: #fefde8;
    border-color: #fef08a;
}

.btn-pin:hover, .btn-pin.is-pinned {
    background-color: #dfc15d;
    color: #fff;
    border-color: #dfc15d;
}

.btn-edit {
    color: #1565c0;
    background-color: #e3f2fd;
    border-color: #bbdefb;
}

.btn-edit:hover {
    background-color: #bbdefb;
}

.btn-delete {
    color: #c62828;
    background-color: #ffebee;
    border-color: #ffcdd2;
}

.btn-delete:hover {
    background-color: #ffcdd2;
}

.inline-form {
    display: inline;
}

/* Empty/No uploads */
.empty-gallery {
    text-align: center;
    padding: 60px 20px;
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #f2e6e3;
    color: #a48b89;
}

/* Toasts */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 280px;
    max-width: 450px;
    padding: 14px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease forwards;
    transition: opacity 0.5s ease;
}

.toast-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.toast-error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.toast-message {
    font-size: 0.9rem;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    margin-left: 12px;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modal Overlay base */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(74, 52, 51, 0.4);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-card {
    background-color: #fff;
    width: 90%;
    max-width: 450px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #f2e6e3;
    animation: modalPop 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes modalPop {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    background-color: #faf6f5;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f2e2df;
}

.modal-header h3 {
    font-size: 1.1rem;
    color: #7b4f4c;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #a48b89;
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #7b4f4c;
}

.modal-body {
    padding: 24px 20px;
}

.modal-footer {
    padding: 16px 20px;
    background-color: #faf6f5;
    border-top: 1px solid #f2e2df;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Lightbox Overlay styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(20, 15, 15, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10002;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #fff;
    font-size: 24px;
    padding: 16px;
    cursor: pointer;
    z-index: 10001;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80%;
    height: 80%;
    max-width: 900px;
    max-height: 700px;
}

#lightbox-media-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-media-file {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox-caption {
    color: #dfc15d;
    margin-top: 16px;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
}

/* Mobile-First Responsiveness */
@media (max-width: 768px) {
    .wedding-hero {
        padding: 10px 5px;
    }
    
    .gallery-header {
        padding: 20px 0 10px 0;
        margin-bottom: 24px;
    }

    .header-top {
        margin-bottom: 20px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .card-info {
        padding: 10px;
    }
    
    .guest-name {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }
    
    .admin-card-actions {
        padding-top: 8px;
        gap: 4px;
    }
    
    .btn-mini {
        padding: 4px 6px;
        font-size: 0.65rem;
        border-radius: 3px;
    }

    .lightbox-prev, .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .lightbox-prev {
        left: 5px;
    }
    
    .lightbox-next {
        right: 5px;
    }
    
    .section-card {
        padding: 20px;
    }
    
    .drag-drop-area {
        padding: 24px 10px;
    }
    
    .drag-drop-main {
        font-size: 0.9rem;
    }
}

/* Pagination Navigation */
.pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.pagination-page {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #e0c8c3;
    background-color: #fff;
    color: #8c716f;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-page:hover:not(.disabled) {
    border-color: #c08b87;
    color: #c08b87;
    background-color: #faf2f1;
}

.pagination-page.active {
    background-color: #c08b87;
    border-color: #c08b87;
    color: #fff;
    box-shadow: 0 4px 8px rgba(192, 139, 135, 0.25);
}

.pagination-page.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #f7edeb;
    border-color: #eddcd9;
}
