@import url('shared-theme.css?v=20260430w');

.gallery-hero {
    background:
        linear-gradient(90deg, rgba(2, 11, 16, 0.92), rgba(5, 24, 32, 0.7), rgba(6, 23, 31, 0.46)),
        linear-gradient(180deg, rgba(6, 23, 31, 0.08), #071319 96%),
        url("../assets/images/header_3.jpg") center/cover;
}

.gallery-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.btn-secondary {
    border: 1px solid rgba(229, 238, 241, 0.18);
    background: rgba(255, 255, 255, 0.075);
    color: #f7fbfc;
    box-shadow: none;
}

.gallery-page {
    padding-top: 58px;
    padding-bottom: 78px;
}

.gallery-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.gallery-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
    gap: 30px;
    align-items: start;
}

.submit-gallery,
.social-post,
.empty-gallery,
.feed-header {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.065);
    box-shadow: 0 18px 48px rgba(0, 8, 14, 0.28);
    backdrop-filter: blur(22px) saturate(1.05);
}

.submit-gallery {
    position: sticky;
    top: 108px;
    padding: 24px;
}

.composer-heading {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    align-items: start;
    margin-bottom: 20px;
}

.composer-heading > span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(105, 208, 196, 0.12);
    color: var(--teal);
}

.composer-heading h2,
.feed-header h2 {
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 1.35rem;
    line-height: 1.2;
}

.composer-heading p,
.feed-header p {
    margin-top: 5px;
    color: var(--muted);
    line-height: 1.6;
}

.gallery-composer-form {
    display: grid;
    gap: 18px;
}

.upload-drop {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 250px;
    overflow: hidden;
    border: 1px dashed rgba(105, 208, 196, 0.42);
    border-radius: 10px;
    background: rgba(7, 19, 25, 0.52);
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.upload-drop:hover,
.upload-drop.is-dragging {
    border-color: var(--teal);
    background: rgba(105, 208, 196, 0.09);
    transform: translateY(-1px);
}

.upload-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 22px;
    text-align: center;
}

.upload-empty i {
    color: var(--teal);
    font-size: 2.2rem;
}

.upload-empty strong {
    color: #ffffff;
}

.upload-empty small {
    color: var(--muted);
}

.image-preview {
    display: none;
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
}

.upload-drop.has-preview .image-preview {
    display: block;
}

.upload-drop.has-preview .upload-empty {
    display: none;
}

.composer-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    color: #d8edf3;
    font-size: 0.88rem;
    font-weight: 800;
}

.form-group input,
.form-group textarea {
    border-radius: 8px;
    background: rgba(7, 19, 25, 0.62);
}

.form-group textarea {
    min-height: 118px;
}

.star-rating-input {
    display: flex;
    gap: 8px;
    min-height: 50px;
    align-items: center;
    padding: 0 2px;
}

/* Star inputs: override the global button rule so stars keep their own colors */
.star-input,
.star-input:hover,
.star-input.active,
.star-rating-input .star-input,
.star-rating-input .star-input:hover,
.star-rating-input .star-input.active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: unset !important;
}

.star-input {
    color: #c8d8e0 !important;
    cursor: pointer;
    font-size: 1.45rem;
    transition: color 0.18s ease, transform 0.18s ease;
}

/* Hover: highlight this star and all before it via JS-driven class */
.star-rating-input:hover .star-input {
    color: #c8d8e0 !important;
}

.star-input.hovered,
.star-input.active {
    /* Gold/amber star color — visible on both light and dark backgrounds */
    color: #f59e0b !important;
    transform: translateY(-2px) scale(1.12);
}

.composer-submit {
    width: 100%;
}

.feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 20px;
}

.feed-share-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(105, 208, 196, 0.26);
    border-radius: 8px;
    color: var(--teal);
    font-weight: 800;
}

.social-feed {
    display: grid;
    gap: 22px;
}

.social-post {
    overflow: hidden;
}

.post-top {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 13px;
    align-items: center;
    padding: 18px;
}

.post-avatar {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a6eee6, #69d0c4);
    color: #071319;
    font-weight: 900;
}

.post-top h3 {
    color: #14283a;
    font-size: 1rem;
    font-weight: 900;
}

.post-top p {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    margin-top: 4px;
    color: #63768a;
    font-size: 0.86rem;
}

.post-top i {
    color: var(--teal);
}

.post-image-button {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #e8edf2 !important;
    box-shadow: none !important;
    cursor: zoom-in;
}

.post-image-button:hover {
    transform: none;
    box-shadow: none !important;
    filter: none;
    background: #e8edf2 !important;
}

.gallery-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 680px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.post-image-button:hover .gallery-image {
    transform: scale(1.025);
}

/* When gallery image fails to load — show a clean placeholder */
.post-image-button.image-failed {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    background: linear-gradient(135deg, #e8edf2, #f4f6f8) !important;
}

.post-image-button.image-failed::after {
    content: "\f03e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 3rem;
    color: #b0bec5;
    opacity: 0.6;
}

.post-actions {
    display: flex;
    gap: 10px;
    padding: 14px 18px 8px;
}

.post-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #63768a;
    box-shadow: none;
    font-weight: 800;
}

.post-action:hover {
    background: rgba(255, 255, 255, 0.07);
    box-shadow: none;
    transform: none;
}

.post-action.is-liked {
    color: #e05252 !important;
}

/* Likes counter badge next to the like button */
.likes-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    padding: 0 6px;
    /* Ensure the global button override doesn't affect this span */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.likes-count i {
    color: #e05252;
    font-size: 0.78rem;
}

.gallery-rating {
    padding: 0 18px;
    color: var(--warning);
    font-size: 0.9rem;
}

.gallery-description {
    padding: 10px 18px 20px;
    color: #63768a;
    line-height: 1.65;
}

.gallery-description strong {
    margin-right: 6px;
    color: #14283a;
}

.empty-gallery {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 70px 24px;
    text-align: center;
}

.empty-gallery > i {
    color: var(--teal);
    font-size: 3rem;
}

.empty-gallery h3 {
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 1.5rem;
}

.empty-gallery p {
    color: var(--muted);
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 6, 10, 0.82);
    backdrop-filter: blur(12px);
}

.gallery-lightbox.visible {
    display: flex;
}

.gallery-lightbox-content {
    position: relative;
    width: min(1040px, 100%);
    max-height: 92vh;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #071319;
    box-shadow: var(--shadow);
}

.gallery-lightbox-content img {
    width: 100%;
    max-height: 74vh;
    object-fit: contain;
    background: #02080c;
}

.gallery-lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(229, 238, 241, 0.16);
    border-radius: 50%;
    background: rgba(7, 19, 25, 0.82);
    color: #ffffff;
    box-shadow: none;
}

.gallery-lightbox-close:hover {
    background: rgba(10, 31, 39, 0.94);
    box-shadow: none;
    filter: none;
    transform: none;
}

.gallery-lightbox-caption {
    padding: 18px 20px;
}

.gallery-lightbox-caption strong {
    display: block;
    color: #ffffff;
    font-family: "Poppins", sans-serif;
}

.gallery-lightbox-caption p {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.65;
}

.modal-open {
    overflow: hidden;
}

@media (max-width: 980px) {
    .gallery-layout {
        grid-template-columns: 1fr;
    }

    .submit-gallery {
        position: relative;
        top: auto;
    }
}

@media (max-width: 620px) {
    .gallery-page {
        padding-top: 42px;
    }

    .gallery-hero-actions,
    .feed-header {
        align-items: stretch;
        flex-direction: column;
    }

    .gallery-hero-actions .btn,
    .feed-share-link {
        width: 100%;
    }

    .submit-gallery,
    .feed-header {
        padding: 18px;
    }

    .composer-fields {
        grid-template-columns: 1fr;
    }

    .upload-drop {
        min-height: 220px;
    }

    .image-preview {
        min-height: 220px;
    }

    .post-top {
        padding: 16px;
    }

    .gallery-image {
        aspect-ratio: 1 / 1;
    }
}

/* === Gallery Auth Gate (inline panel) === */
.gallery-auth-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 28px;
    border: 1px dashed rgba(105, 208, 196, 0.25);
    border-radius: 16px;
    background: rgba(105, 208, 196, 0.04);
    min-height: 320px;
    justify-content: center;
}

.gallery-auth-gate .auth-gate-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(105, 208, 196, 0.18), rgba(105, 208, 196, 0.06));
    border: 1px solid rgba(105, 208, 196, 0.25);
}

.gallery-auth-gate .auth-gate-icon i {
    font-size: 1.6rem;
    color: #69d0c4;
}

.gallery-auth-gate h2 {
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.gallery-auth-gate > p {
    color: #b8c8ce;
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 24px;
    max-width: 280px;
}

.gallery-auth-gate .auth-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 260px;
    margin-bottom: 16px;
}

.gallery-auth-gate .auth-gate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, filter 0.2s;
}

.gallery-auth-gate .auth-gate-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.gallery-auth-gate .auth-gate-btn--primary {
    background: linear-gradient(135deg, #8cd6cb, #69c4b8);
    color: #031118;
    box-shadow: 0 8px 24px rgba(105, 208, 196, 0.3);
}

.gallery-auth-gate .auth-gate-btn--secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(218, 239, 242, 0.18);
    color: #f3fbfd;
}

.gallery-auth-gate .auth-gate-note {
    font-size: 0.78rem;
    color: #b8c8ce;
}

.gallery-auth-gate .auth-gate-note a {
    color: #69d0c4;
    font-weight: 600;
    text-decoration: none;
}

.gallery-auth-gate .auth-gate-note a:hover {
    text-decoration: underline;
}
/* === End Gallery Auth Gate === */

/* === Final Teal Travel Page Override === */
:root {
    --bg: #eef4f7;
    --bg-2: #f6f9fb;
    --panel: #ffffff;
    --line: #d9e3ea;
    --line-strong: #b9c8d3;
    --text: #10202b;
    --muted: #607080;
    --primary: #0f766e;
    --teal: #0f766e;
    --cyan: #256d85;
    --warning: #d97706;
    --success: #15803d;
    --danger: #b91c1c;
    --shadow: 0 14px 34px rgba(16, 32, 43, 0.09);
}

body {
    background: #eef4f7 !important;
    color: var(--text) !important;
}

.header,
.gallery-card,
.gallery-post,
.gallery-upload-card,
.gallery-auth-gate,
.gallery-lightbox-caption,
.empty-gallery {
    background: #ffffff !important;
    border-color: var(--line) !important;
    color: var(--text) !important;
    box-shadow: var(--shadow) !important;
}

.logo h1,
.header h1,
.gallery-card h3,
.gallery-post h3,
.gallery-upload-card h3,
.gallery-auth-gate h3,
.section-title,
h2,
h3 {
    color: var(--text) !important;
    -webkit-text-fill-color: var(--text) !important;
}

.hero h1,
.hero p {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.logo p,
.header p,
.gallery-card p,
.gallery-post p,
.gallery-upload-card p,
.gallery-auth-gate p,
.gallery-auth-gate .auth-gate-note {
    color: var(--muted) !important;
}

.nav a {
    color: #263747 !important;
}

.nav a:hover,
.nav a.active {
    color: var(--primary) !important;
    background: #e8f5f3 !important;
    border-color: #b8ded8 !important;
}

.gallery-submit,
.gallery-action,
.auth-gate-btn,
.btn,
button {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.18) !important;
}

.gallery-auth-gate .auth-gate-note a,
a:not(.nav a):not(.btn) {
    color: var(--primary) !important;
}
/* === End Final Teal Travel Page Override === */

/* === Coastal Blue Client Page Override === */
:root {
    --bg: #f3f8fb;
    --panel: #ffffff;
    --line: #d9e7ef;
    --line-strong: #b8ccd8;
    --text: #14283a;
    --muted: #63768a;
    --primary: #1f7a9c;
    --teal: #1f7a9c;
    --cyan: #4ea7c8;
    --warning: #d99a2b;
    --shadow: 0 16px 38px rgba(20, 40, 58, 0.1);
}

body {
    background: #f3f8fb !important;
    color: var(--text) !important;
}

.header,
.gallery-card,
.gallery-post,
.gallery-upload-card,
.gallery-auth-gate,
.gallery-lightbox-caption,
.empty-gallery {
    background: #ffffff !important;
    border-color: var(--line) !important;
    color: var(--text) !important;
    box-shadow: var(--shadow) !important;
}

.hero h1,
.hero p {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.logo h1,
.header h1,
.gallery-card h3,
.gallery-post h3,
.gallery-upload-card h3,
.gallery-auth-gate h3,
.section-title,
h2,
h3 {
    color: var(--text) !important;
    -webkit-text-fill-color: var(--text) !important;
}

.logo p,
.header p,
.gallery-card p,
.gallery-post p,
.gallery-upload-card p,
.gallery-auth-gate p,
.gallery-auth-gate .auth-gate-note {
    color: var(--muted) !important;
}

.nav a {
    color: #2d4053 !important;
}

.nav a:hover,
.nav a.active {
    color: var(--primary) !important;
    background: #eaf6fb !important;
    border-color: #bfe1ee !important;
}

.gallery-submit,
.gallery-action,
.auth-gate-btn,
.btn,
button {
    background: #e6b44f !important;
    border-color: #e6b44f !important;
    color: #14283a !important;
    box-shadow: 0 12px 26px rgba(170, 121, 34, 0.2) !important;
}

.gallery-auth-gate .auth-gate-note a,
a:not(.nav a):not(.btn) {
    color: var(--primary) !important;
}
/* === End Coastal Blue Client Page Override === */

/* ================================================================
   STAR RATING — SCOPED OVERRIDES
   These rules must come LAST so they beat final-palette.css which
   sets .fa-star { color: var(--sunset) !important } globally and
   the button { background: ... !important } rule.
   ================================================================ */

/* Input stars in the gallery composer form */
.star-rating-input .star-input {
    display: inline-block !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: unset !important;
    width: auto !important;
    height: auto !important;
    font-size: 1.45rem !important;
    cursor: pointer !important;
    transition: color 0.18s ease, transform 0.18s ease !important;
    /* Default: unselected grey */
    color: #b0bec5 !important;
    -webkit-text-fill-color: #b0bec5 !important;
}

/* Hovered or selected: gold */
.star-rating-input .star-input.hovered,
.star-rating-input .star-input.active {
    color: #f59e0b !important;
    -webkit-text-fill-color: #f59e0b !important;
    transform: translateY(-2px) scale(1.12) !important;
}

/* Display stars on feed posts — always gold (they show the saved rating) */
.gallery-rating i.fa-star,
.gallery-rating i.far.fa-star {
    color: #f59e0b !important;
    -webkit-text-fill-color: #f59e0b !important;
}
.gallery-rating i.far.fa-star {
    color: #d1d5db !important;
    -webkit-text-fill-color: #d1d5db !important;
}

/* Post avatar — profile picture support */
.post-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.post-avatar.avatar-initials {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #a6eee6, #69d0c4) !important;
    color: #071319 !important;
    font-weight: 900 !important;
    font-size: 1rem !important;
}

/* ── Post owner actions (Edit / Delete) ── */
.post-owner-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.post-edit-btn {
    color: #467bb5 !important;
    -webkit-text-fill-color: #467bb5 !important;
}

.post-edit-btn:hover {
    background: #eef5ff !important;
    color: #14395f !important;
    -webkit-text-fill-color: #14395f !important;
}

.post-delete-btn {
    color: #b91c1c !important;
    -webkit-text-fill-color: #b91c1c !important;
}

.post-delete-btn:hover {
    background: #fef2f2 !important;
    color: #7f1d1d !important;
    -webkit-text-fill-color: #7f1d1d !important;
}

/* ── Gallery Modals (Delete / Edit) ── */
.gallery-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 20, 40, 0.55);
    backdrop-filter: blur(6px);
    transition: opacity 0.2s ease;
}

.gallery-modal-overlay.active {
    display: flex;
}

.gallery-modal-box {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #ffffff !important;
    border-radius: 16px;
    padding: 32px 28px 28px;
    box-shadow: 0 24px 60px rgba(10, 20, 40, 0.22) !important;
    text-align: center;
    border: none !important;
}

.gallery-modal-overlay.active .gallery-modal-box {
    transform: scale(1);
}

.gallery-modal-box--wide {
    max-width: 500px;
    text-align: left;
}

.gallery-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.gallery-modal-close:hover {
    background: #e2e8f0;
}

.gallery-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 16px;
    font-size: 1.4rem;
}

.gallery-modal-icon--danger {
    background: #fef2f2;
    color: #b91c1c;
}

.gallery-modal-icon--edit {
    background: #eff6ff;
    color: #467bb5;
}

.gallery-modal-box h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #14395f;
    margin: 0 0 10px;
}

.gallery-modal-box p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 24px;
}

.gallery-modal-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    color: #991b1b;
    font-size: 0.85rem;
}

.gallery-modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.gallery-modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gallery-modal-field label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #14395f;
}

.gallery-modal-field input,
.gallery-modal-field textarea {
    padding: 10px 14px;
    border: 1px solid #d8e2f2;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #14395f;
    background: #f8fafc;
    resize: vertical;
}

.gallery-modal-field input:focus,
.gallery-modal-field textarea:focus {
    border-color: #467bb5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(70, 123, 181, 0.12);
}

.gallery-edit-stars {
    display: flex;
    gap: 6px;
    padding: 4px 0;
}

.gallery-edit-star {
    font-size: 1.4rem;
    color: #f59e0b;
    cursor: pointer;
    transition: transform 0.15s;
}

.gallery-edit-star:hover {
    transform: scale(1.15);
}

.gallery-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.gallery-modal-box--wide .gallery-modal-actions {
    justify-content: flex-end;
}

.gallery-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.gallery-modal-btn--cancel {
    background: #f1f5f9;
    color: #475569;
}

.gallery-modal-btn--cancel:hover {
    background: #e2e8f0;
}

.gallery-modal-btn--danger {
    background: #b91c1c;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(185, 28, 28, 0.25);
}

.gallery-modal-btn--danger:hover {
    background: #991b1b;
}

.gallery-modal-btn--save {
    background: #467bb5;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(70, 123, 181, 0.25);
}

.gallery-modal-btn--save:hover {
    background: #14395f;
}

.gallery-modal-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ── Gallery modal button overrides — beat global button rules ── */
.gallery-modal-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 10px 20px !important;
    border-radius: 10px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    border: none !important;
    min-height: unset !important;
    box-shadow: none !important;
    transition: all 0.2s !important;
}

.gallery-modal-btn--cancel,
.gallery-modal-btn--cancel:hover {
    background: #f1f5f9 !important;
    color: #475569 !important;
    -webkit-text-fill-color: #475569 !important;
    box-shadow: none !important;
}

.gallery-modal-btn--cancel:hover {
    background: #e2e8f0 !important;
}

.gallery-modal-btn--danger {
    background: #b91c1c !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(185,28,28,0.25) !important;
}

.gallery-modal-btn--danger:hover {
    background: #991b1b !important;
}

.gallery-modal-btn--save {
    background: #467bb5 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(70,123,181,0.25) !important;
}

.gallery-modal-btn--save:hover {
    background: #14395f !important;
}

.gallery-modal-btn:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
}

.gallery-modal-box h3 {
    color: #14395f !important;
    -webkit-text-fill-color: #14395f !important;
}

.gallery-modal-box p {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
}

.gallery-modal-field label {
    color: #14395f !important;
    -webkit-text-fill-color: #14395f !important;
}

.gallery-modal-field input,
.gallery-modal-field textarea {
    background: #f8fafc !important;
    border: 1px solid #d8e2f2 !important;
    color: #14395f !important;
    box-shadow: none !important;
}

.gallery-modal-close {
    background: #f1f5f9 !important;
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
    border: none !important;
    box-shadow: none !important;
    min-height: unset !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 50% !important;
}

.gallery-modal-close:hover {
    background: #e2e8f0 !important;
    transform: none !important;
}

.gallery-edit-star {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: unset !important;
    color: #f59e0b !important;
    -webkit-text-fill-color: #f59e0b !important;
    font-size: 1.4rem !important;
    cursor: pointer !important;
}

/* ── CRITICAL: Force modal overlay to be fixed fullscreen centered ── */
#deletePostOverlay,
#editPostOverlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    background: rgba(10, 20, 40, 0.65) !important;
    backdrop-filter: blur(6px) !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    border-radius: 0 !important;
    inset: 0 !important;
}

#deletePostOverlay.active,
#editPostOverlay.active {
    display: flex !important;
}

#deletePostOverlay .gallery-modal-box,
#editPostOverlay .gallery-modal-box {
    position: relative !important;
    margin: auto !important;
    width: 100% !important;
    max-width: 440px !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 32px 28px 28px !important;
    box-shadow: 0 24px 60px rgba(10, 20, 40, 0.3) !important;
    border: none !important;
    transform: none !important;
    inset: unset !important;
    top: unset !important;
    left: unset !important;
    right: unset !important;
    bottom: unset !important;
}

#editPostOverlay .gallery-modal-box {
    max-width: 520px !important;
    text-align: left !important;
}
