/* Celebration Theme - Party time for birthdays, New Year's Eve, and all celebratory events! */

.theme-celebration {
    /* ============================================================
       Palette — adjust these to restyle everything below
       ============================================================ */
    --theme-primary:       #FF1493;   /* hot pink — main buttons, checked states */
    --theme-primary-mid:   #E0127F;   /* darker pink — hover */
    --theme-primary-light: #FF69B4;   /* lighter pink — pale accents */
    --theme-purple:        #8B00FF;   /* violet — card headings, checkboxes, borders */
    --theme-purple-mid:    #7A00E0;   /* darker violet — hover states */
    --theme-orange:        #FF6B35;   /* orange — borders, alerts */
    --theme-gold:          #FFD700;   /* gold — button borders, highlights */
    --theme-cyan:          #00CED1;   /* dark turquoise — secondary gradients */
    --theme-bg:            #ffffff;   /* card background */
    --theme-text:          #2d2d2d;   /* body text */
    --theme-text-muted:    #6b5b95;   /* muted text — passes 4.5:1 vs white card */
    --theme-gradient:      linear-gradient(135deg, #1a0a2e 0%, #2d1b4e 50%, #1a0a2e 100%);
    --theme-btn-gradient:  linear-gradient(45deg, #FF1493, #FF6B35, #FFD700, #FF1493);
    --theme-radius-card:   20px;
    --theme-radius-btn:    18px;
    --theme-radius-input:  14px;

    /* Bridge for global .text-primary override in styles.css */
    --primary-color: #FF1493;

    background: var(--theme-gradient) !important;
    color: var(--theme-text) !important;
    min-height: 100vh !important;
    position: relative;
}

/* ---- Background ---- */
.theme-celebration,
body.theme-celebration,
.theme-celebration body,
html.theme-celebration,
body.theme-celebration main,
.form-preview.theme-celebration {
    background: var(--theme-gradient) !important;
    background-attachment: fixed !important;
    color: var(--theme-text) !important;
    min-height: 100vh !important;
    position: relative;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .theme-celebration,
    body.theme-celebration,
    html.theme-celebration {
        background-attachment: scroll !important;
        background-size: cover !important;
    }
}

/* Subtle sparkle dot overlay */
.theme-celebration::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.12;
    pointer-events: none;
    z-index: -5;
    animation: celebration-sparkle 8s ease-in-out infinite;
}

@keyframes celebration-sparkle {
    0%, 100% { opacity: 0.08; transform: scale(1); }
    50%       { opacity: 0.18; transform: scale(1.05); }
}

/* ---- Transparent containers ---- */
.theme-celebration .container,
.theme-celebration .container-narrow,
.theme-celebration main,
.theme-celebration .py-2,
.theme-celebration .py-md-5,
.theme-celebration .py-4 {
    background: transparent !important;
}

/* ---- Cards ---- */
.theme-celebration .card {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 3px solid var(--theme-purple) !important;
    border-radius: var(--theme-radius-card) !important;
    box-shadow: 0 10px 30px rgba(139, 0, 255, 0.25) !important;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 100;
}

.theme-celebration .card-body {
    background: transparent !important;
    position: relative;
    z-index: 1;
}

/* ---- Typography ---- */

/* Page headings sit on the dark gradient — must be light for contrast */
.theme-celebration h1,
.theme-celebration h2,
.theme-celebration h3,
.theme-celebration h4,
.theme-celebration h5,
.theme-celebration h6 {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
}

/* Card/modal headings sit on white — use violet for contrast */
.theme-celebration .card h1,
.theme-celebration .card h2,
.theme-celebration .card h3,
.theme-celebration .card h4,
.theme-celebration .card h5,
.theme-celebration .card h6,
.theme-celebration .card .card-title,
.theme-celebration .modal-content h1,
.theme-celebration .modal-content h2,
.theme-celebration .modal-content h3,
.theme-celebration .modal-content h4,
.theme-celebration .modal-content h5,
.theme-celebration .modal-content h6 {
    color: var(--theme-purple) !important;
    text-shadow: none !important;
}

/* Form labels on white card backgrounds */
.theme-celebration .form-label {
    color: var(--theme-purple) !important;
    font-weight: 600 !important;
    text-shadow: none !important;
}

.theme-celebration p,
.theme-celebration .card-text,
.theme-celebration .ql-editor {
    color: var(--theme-text) !important;
    font-weight: 500 !important;
}

.theme-celebration .text-muted,
.theme-celebration small {
    color: var(--theme-text-muted) !important;
    font-weight: 500 !important;
}

.theme-celebration ::placeholder,
.theme-celebration .form-control::placeholder,
.theme-celebration textarea::placeholder {
    color: #a08ab0 !important;
    opacity: 0.7 !important;
}

.theme-celebration .editable-field:empty:before,
.theme-celebration .editable-field-inline:empty:before {
    color: #a08ab0 !important;
    opacity: 0.7 !important;
}

.theme-celebration .required-asterisk {
    color: var(--theme-primary) !important;
    font-weight: bold !important;
}

/* ---- Form Inputs ---- */
.theme-celebration .form-control,
.theme-celebration .form-select,
.theme-celebration textarea {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 2px solid var(--theme-orange) !important;
    color: var(--theme-text) !important;
    border-radius: var(--theme-radius-input) !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.12) !important;
    font-size: 16px !important; /* Prevents iOS zoom — do not remove */
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

/* Smaller font for date/time inputs and compact inline selects to prevent overflow */
.theme-celebration .date-row-input,
.theme-celebration .time-row-input,
.theme-celebration .timezone-row-select,
.theme-celebration .duration-row-select,
.theme-celebration input[type="date"],
.theme-celebration input[type="time"],
.theme-celebration #futurePeriodType,
.theme-celebration #hideOptionLeadHoursContainer {
    font-size: 14px !important;
}

/* Compact inline selects need a smaller border-radius to avoid clipping text/arrow */
.theme-celebration #futurePeriodType,
.theme-celebration #hideOptionLeadHoursContainer {
    border-radius: 6px !important;
}

.theme-celebration .form-control:focus,
.theme-celebration .form-select:focus,
.theme-celebration textarea:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 25px rgba(255, 20, 147, 0.35) !important;
    background: rgba(255, 255, 255, 1) !important;
    color: var(--theme-text) !important;
    transform: translateY(-1px);
    outline: none !important;
}

/* Specific inputs */
.theme-celebration #formTitle,
.theme-celebration input[name="title"],
.theme-celebration .option-input,
.theme-celebration input[name="options[]"],
.theme-celebration input[name="field_labels[]"],
.theme-celebration input[name="second_question_options[]"],
.theme-celebration .additional-question-section input[type="text"],
.theme-celebration input[name="creator_email"],
.theme-celebration input[type="email"],
.theme-celebration input[name="name"],
.theme-celebration input[id="responder_name"],
.theme-celebration input[id="responder_email"],
.theme-celebration input[name="comment_help_text"],
.theme-celebration input[name="name_field_label"],
.theme-celebration input[name="email_field_label"] {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 2px solid var(--theme-orange) !important;
    color: var(--theme-text) !important;
    border-radius: var(--theme-radius-input) !important;
    font-weight: 500 !important;
}

/* Editable inline fields */
.theme-celebration .editable-field,
.theme-celebration .editable-field-inline {
    background: rgba(255, 255, 255, 0.98) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-orange) !important;
}

.theme-celebration .editable-field:hover,
.theme-celebration .editable-field-inline:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: var(--theme-primary) !important;
}

.theme-celebration .editable-field:focus,
.theme-celebration .editable-field-inline:focus {
    background: rgba(255, 255, 255, 1) !important;
    border-color: var(--theme-primary) !important;
    color: var(--theme-text) !important;
}

/* ---- Checkboxes & Radios ----
   Use background-color (NOT background shorthand) — the shorthand resets
   background-image which destroys the toggle switch thumb. */
.theme-celebration .form-check-input {
    background-color: rgba(255, 255, 255, 0.98) !important;
    border: 2px solid var(--theme-purple) !important;
    width: 18px !important;
    height: 18px !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

/* CHECKBOX — square (switch rule below overrides this for toggle switches) */
.theme-celebration .form-check-input[type="checkbox"] {
    border-radius: 4px !important;
}

/* RADIO — circle */
.theme-celebration .form-check-input[type="radio"] {
    border-radius: 50% !important;
}

.theme-celebration .form-check-input:checked {
    background-color: var(--theme-purple) !important;
    border-color: var(--theme-purple) !important;
    box-shadow: none !important;
}

/* Radio buttons: remove Bootstrap's white center dot SVG for a solid filled circle */
.theme-celebration .form-check-input[type="radio"]:checked {
    background-image: none !important;
}

.theme-celebration .form-check-label {
    color: var(--theme-text) !important;
    font-weight: 500 !important;
}

/* ---- Toggle Switches ----
   Use --bs-form-switch-bg to set white SVG thumb — do NOT use background-image: none.
   background-color (not background shorthand) sets the track color only. */
.theme-celebration .form-switch .form-check-input {
    --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e");
    background-color: rgba(139, 0, 255, 0.3) !important;
    border: 2px solid var(--theme-purple) !important;
    border-radius: 2em !important;
    width: 2em !important;
    height: 1em !important;
}

.theme-celebration .form-switch .form-check-input:checked {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
}

/* ---- Primary Buttons ----
   Note: font-size NOT overridden — use Bootstrap defaults.
   #submitBtn included to win the specificity battle against global styles.css rule. */
.theme-celebration .btn-primary,
.theme-celebration button[type="submit"],
.theme-celebration #submitBtn {
    background: var(--theme-btn-gradient) !important;
    background-size: 300% 300% !important;
    border: 3px solid var(--theme-gold) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 12px 28px !important;
    box-shadow: 0 8px 25px rgba(255, 20, 147, 0.4), 0 4px 15px rgba(255, 215, 0, 0.3) !important;
    border-radius: var(--theme-radius-btn) !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2) !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
    animation: celebration-shimmer 4s ease-in-out infinite;
}

@keyframes celebration-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

/* Sparkle overlay on hover */
.theme-celebration .btn-primary::before,
.theme-celebration button[type="submit"]::before,
.theme-celebration #submitBtn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-celebration .btn-primary:hover::before,
.theme-celebration button[type="submit"]:hover::before,
.theme-celebration #submitBtn:hover::before {
    opacity: 1;
    animation: celebration-sparkle-rotate 1s linear infinite;
}

@keyframes celebration-sparkle-rotate {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.theme-celebration .btn-primary:hover,
.theme-celebration button[type="submit"]:hover,
.theme-celebration #submitBtn:hover {
    background: linear-gradient(45deg, #FF1493, #8B00FF, #00CED1, #FFD700) !important;
    background-size: 300% 300% !important;
    border-color: var(--theme-primary) !important;
    box-shadow: 0 12px 35px rgba(255, 20, 147, 0.5), 0 0 25px rgba(255, 215, 0, 0.5) !important;
    transform: translateY(-3px) scale(1.03);
    color: #ffffff !important;
}

.theme-celebration .btn-primary:active,
.theme-celebration button[type="submit"]:active,
.theme-celebration #submitBtn:active {
    transform: translateY(-1px) scale(1.01) !important;
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.4) !important;
}

.theme-celebration .btn-primary:focus,
.theme-celebration #submitBtn:focus {
    outline: 3px solid rgba(255, 20, 147, 0.5) !important;
    outline-offset: 2px;
}

/* ---- Secondary Buttons ---- */
.theme-celebration .btn-secondary {
    background: linear-gradient(45deg, var(--theme-purple), var(--theme-cyan)) !important;
    border: 3px solid var(--theme-purple) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 6px 20px rgba(139, 0, 255, 0.3) !important;
    border-radius: var(--theme-radius-btn) !important;
    transition: all 0.3s ease !important;
}

.theme-celebration .btn-secondary:hover,
.theme-celebration .btn-secondary:active,
.theme-celebration .btn-secondary:focus {
    background: linear-gradient(45deg, var(--theme-cyan), var(--theme-purple)) !important;
    border-color: var(--theme-cyan) !important;
    box-shadow: 0 8px 28px rgba(0, 206, 209, 0.4) !important;
    transform: translateY(-2px);
    color: #ffffff !important;
}

/* ---- Outline Buttons ---- */
.theme-celebration .btn-outline-primary {
    color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    border-width: 3px !important;
    border-radius: var(--theme-radius-btn) !important;
    font-weight: 700 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    transition: all 0.3s ease !important;
}

.theme-celebration .btn-outline-primary:hover {
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-purple)) !important;
    color: #ffffff !important;
    border-color: var(--theme-primary) !important;
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.4) !important;
    transform: translateY(-1px);
}

/* Active/checked state for toggle button groups */
.theme-celebration .btn-check:checked + .btn-outline-primary,
.theme-celebration .btn-outline-primary:active,
.theme-celebration .btn-outline-primary.active {
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-purple)) !important;
    color: #ffffff !important;
    border-color: var(--theme-primary) !important;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.5), inset 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    font-weight: 700 !important;
}

.theme-celebration .btn-check:checked + .btn-outline-primary .bi,
.theme-celebration .btn-outline-primary:active .bi,
.theme-celebration .btn-outline-primary.active .bi {
    color: #ffffff !important;
}

.theme-celebration .btn-outline-secondary {
    color: var(--theme-purple) !important;
    border-color: var(--theme-purple) !important;
    border-width: 3px !important;
    border-radius: var(--theme-radius-btn) !important;
    font-weight: 700 !important;
    background: rgba(255, 255, 255, 0.5) !important;
    transition: all 0.3s ease !important;
}

.theme-celebration .btn-outline-secondary:hover,
.theme-celebration .btn-outline-secondary:focus,
.theme-celebration .btn-outline-secondary:active {
    background: linear-gradient(45deg, var(--theme-purple), var(--theme-cyan)) !important;
    color: #ffffff !important;
    border-color: var(--theme-purple) !important;
    box-shadow: 0 6px 20px rgba(139, 0, 255, 0.4) !important;
    transform: translateY(-1px);
}

.theme-celebration .btn-check:checked + .btn-outline-secondary {
    background: var(--theme-purple) !important;
    border-color: var(--theme-purple) !important;
    color: #ffffff !important;
}

/* btn-outline-danger — Cancel buttons in modals/forms */
.theme-celebration .btn-outline-danger {
    color: var(--theme-orange) !important;
    border-color: var(--theme-orange) !important;
    border-width: 2px !important;
    border-radius: var(--theme-radius-btn) !important;
    font-weight: 600 !important;
    background: transparent !important;
    transition: all 0.3s ease !important;
}

.theme-celebration .btn-outline-danger:hover {
    background: var(--theme-orange) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.35) !important;
    transform: translateY(-1px);
}

/* Segmented control (title alignment btn-group) */
.theme-celebration .btn-group[aria-label="Title alignment"] {
    background: rgba(139, 0, 255, 0.12) !important;
    box-shadow: inset 0 1px 2px rgba(139, 0, 255, 0.15) !important;
}

.theme-celebration .btn-group[aria-label="Title alignment"] .btn {
    color: var(--theme-purple) !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.theme-celebration .btn-group[aria-label="Title alignment"] .btn-check:checked + .btn,
.theme-celebration .btn-group[aria-label="Title alignment"] .btn-secondary {
    background: var(--theme-bg) !important;
    color: var(--theme-purple) !important;
    box-shadow: 0 1px 3px rgba(139, 0, 255, 0.2) !important;
}

/* Other btn-groups — restore connected shape */
.theme-celebration .btn-group:not([aria-label="Title alignment"]) .btn {
    border-radius: 0 !important;
    transform: none !important;
}

.theme-celebration .btn-group:not([aria-label="Title alignment"]) > label.btn:first-of-type,
.theme-celebration .btn-group:not([aria-label="Title alignment"]) > button.btn:first-child {
    border-top-left-radius: 6px !important;
    border-bottom-left-radius: 6px !important;
}

.theme-celebration .btn-group:not([aria-label="Title alignment"]) > label.btn:last-child,
.theme-celebration .btn-group:not([aria-label="Title alignment"]) > button.btn:last-child {
    border-top-right-radius: 6px !important;
    border-bottom-right-radius: 6px !important;
}

/* Shared transition */
.theme-celebration .btn,
.theme-celebration .form-control,
.theme-celebration .list-group-item {
    transition: all 0.3s ease !important;
}

/* ---- List Items (option rows on /respond) ---- */
.theme-celebration .list-group-item {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid transparent !important;
    border-left: 5px solid var(--theme-primary) !important;
    color: var(--theme-text) !important;
    margin-bottom: 12px !important;
    border-radius: 16px !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 18px rgba(255, 20, 147, 0.18) !important;
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

/* Animated rainbow left bar */
.theme-celebration .list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #FF1493, #8B00FF, #00CED1, #FFD700, #FF6B35);
    background-size: 100% 200%;
    animation: celebration-border-slide 3s ease-in-out infinite;
}

@keyframes celebration-border-slide {
    0%, 100% { background-position: 0% 0%; }
    50%       { background-position: 0% 100%; }
}

.theme-celebration .list-group-item:hover {
    background: rgba(255, 245, 255, 0.98) !important;
    box-shadow: 0 8px 28px rgba(255, 20, 147, 0.35), 0 4px 15px rgba(139, 0, 255, 0.2) !important;
    transform: translateY(-2px) translateX(3px);
    border-color: transparent !important;
}

/* ---- Disabled/Taken Options ---- */
.theme-celebration .list-group-item input:disabled + label {
    color: var(--theme-text-muted) !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    text-decoration: line-through !important;
}

.theme-celebration .list-group-item input:disabled ~ small {
    color: var(--theme-primary) !important;
    font-weight: 600 !important;
}

.theme-celebration .list-group-item:has(input:disabled) {
    background: rgba(255, 20, 147, 0.1) !important;
    border-color: rgba(139, 0, 255, 0.35) !important;
    opacity: 0.75 !important;
}

.theme-celebration .list-group-item:has(input:disabled):hover {
    background: rgba(255, 20, 147, 0.1) !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: 0 4px 18px rgba(255, 20, 147, 0.15) !important;
}

.theme-celebration .list-group-item:has(input:disabled)::before {
    background: linear-gradient(180deg, rgba(255, 20, 147, 0.4), rgba(139, 0, 255, 0.4)) !important;
}

/* ---- Option Items (form_preview editor) ---- */
.theme-celebration .option-item {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid var(--theme-orange) !important;
    box-shadow: 0 4px 18px rgba(255, 107, 53, 0.15) !important;
    border-radius: 16px !important;
    transition: all 0.3s ease !important;
}

.theme-celebration .option-item:hover {
    box-shadow: 0 6px 24px rgba(255, 20, 147, 0.25) !important;
    transform: translateY(-1px);
    border-color: var(--theme-primary) !important;
}

/* ---- Alerts ---- */
.theme-celebration .alert {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid var(--theme-orange) !important;
    border-left: 5px solid var(--theme-gold) !important;
    color: var(--theme-text) !important;
    box-shadow: 0 6px 22px rgba(255, 107, 53, 0.2) !important;
    border-radius: 16px !important;
}

/* ---- Form Sections ---- */
.theme-celebration .form-section-respondent,
.theme-celebration .form-section-main-options,
.theme-celebration .form-section-additional {
    border-color: var(--theme-orange) !important;
    box-shadow: 0 8px 28px rgba(255, 107, 53, 0.15) !important;
    border-radius: 24px !important;
}

.theme-celebration .form-section-header {
    background: linear-gradient(90deg, rgba(255, 20, 147, 0.08), rgba(139, 0, 255, 0.08)) !important;
    color: var(--theme-text) !important;
    border-bottom: 2px solid var(--theme-orange) !important;
    border-radius: 22px 22px 0 0 !important;
    font-weight: 700 !important;
}

/* ---- Additional Questions ---- */
.theme-celebration .additional-question-section .card,
.theme-celebration .additional-question-item,
.theme-celebration #newAdditionalQuestionsContainer .card {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 3px solid var(--theme-orange) !important;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.15) !important;
    border-radius: 24px !important;
}

.theme-celebration .additional-question-section .card-body,
.theme-celebration .additional-question-item .card-body {
    background: transparent !important;
    color: var(--theme-text) !important;
}

.theme-celebration .additional-question-section .form-label,
.theme-celebration .additional-question-section .fw-semibold,
.theme-celebration .additional-question-section h6,
.theme-celebration .additional-question-section .additional-question-header h6,
.theme-celebration .additional-question-section .additional-question-title,
.theme-celebration .additional-question-section .additional-question-body .form-label,
.theme-celebration .additional-question-section .additional-question-body .fw-semibold {
    color: var(--theme-purple) !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}

.theme-celebration .additional-question-section .additional-question-body .form-check-label {
    color: var(--theme-text) !important;
    font-weight: 500 !important;
}

/* Fix vertical alignment of larger radio/checkbox inputs everywhere (excludes toggle switches) */
.theme-celebration .form-check:not(.form-switch) {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.theme-celebration .form-check:not(.form-switch) .form-check-input {
    margin-top: 0 !important;
    flex-shrink: 0 !important;
}

.theme-celebration .form-check:not(.form-switch) .form-check-label {
    margin-bottom: 0 !important;
}
/* Preserve inline-block display when Bootstrap d-inline-block is used (e.g. Silent Save checkbox) */
.theme-celebration .form-check.d-inline-block:not(.form-switch) {
    display: inline-flex !important;
}

.theme-celebration .additional-question-section .text-muted,
.theme-celebration .additional-question-item .text-muted {
    color: var(--theme-text-muted) !important;
    font-weight: 500 !important;
}

/* ---- Editor Action Bar (top-right Help/Settings/Preview buttons) ---- */
/* These use hardcoded teal in an inline <style> block — must override here */
.theme-celebration .editor-action-btn--primary {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-purple)) !important;
    border-color: var(--theme-primary) !important;
    color: #ffffff !important;
}

.theme-celebration .editor-action-btn--primary:hover {
    background: linear-gradient(135deg, var(--theme-purple), var(--theme-primary)) !important;
    border-color: var(--theme-purple) !important;
    color: #ffffff !important;
}

/* ---- Quill Editor ---- */
.theme-celebration .ql-toolbar.ql-snow {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: var(--theme-orange) !important;
    border-radius: 14px 14px 0 0 !important;
}

.theme-celebration .ql-container.ql-snow {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: var(--theme-orange) !important;
    color: var(--theme-text) !important;
    border-radius: 0 0 14px 14px !important;
}

.theme-celebration .ql-editor {
    color: var(--theme-text) !important;
}

/* ---- Icons ---- */
/* Default: icons on dark gradient background should be visible */
.theme-celebration .bi {
    color: var(--theme-purple) !important;
}

/* Icons inside white cards/lists/modals */
.theme-celebration .card .bi,
.theme-celebration .list-group-item .bi,
.theme-celebration .modal-content .bi,
.theme-celebration .alert .bi {
    color: var(--theme-text) !important;
}

/* Option link icons stay blue */
.theme-celebration .list-group-item .option-link-icon .bi {
    color: #0066cc !important;
}

/* Navbar & button icons inherit from parent */
.theme-celebration .navbar .bi,
.theme-celebration .btn .bi {
    color: inherit !important;
}

/* Specific icons */
.theme-celebration .bi-calendar-event-fill,
.theme-celebration .bi-clock-fill,
.theme-celebration .bi-geo-alt-fill,
.theme-celebration .max-signups-icon,
.theme-celebration .bi-people-fill {
    color: var(--theme-primary) !important;
}

/* ---- Navbar ---- */
.theme-celebration .navbar {
    background: linear-gradient(90deg, #FFE5F1 0%, #F5E6FF 50%, #E6F3FF 100%) !important;
    border-bottom: 3px solid var(--theme-orange) !important;
    box-shadow: 0 4px 18px rgba(255, 20, 147, 0.2) !important;
}

.theme-celebration .brand-text-primary {
    color: var(--theme-purple) !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 4px rgba(139, 0, 255, 0.2) !important;
}

.theme-celebration .brand-text-white {
    color: var(--theme-orange) !important;
    text-shadow: 0 2px 4px rgba(255, 107, 53, 0.2) !important;
}

/* Recolor logo SVG to match brand-text-white (orange #FF6B35) */
.theme-celebration .navbar-brand img {
    filter: brightness(0) saturate(100%) invert(50%) sepia(87%) saturate(1200%) hue-rotate(345deg) brightness(103%) contrast(105%);
    transition: filter 0.3s ease !important;
}

.theme-celebration .navbar-brand:hover .brand-text-primary {
    color: var(--theme-primary) !important;
}

.theme-celebration .navbar-brand:hover .brand-text-white {
    color: var(--theme-orange) !important;
}

/* Keep same logo color on hover — no jarring shift */
.theme-celebration .navbar-brand:hover img {
    filter: brightness(0) saturate(100%) invert(50%) sepia(87%) saturate(1200%) hue-rotate(345deg) brightness(115%) contrast(105%);
}

.theme-celebration .navbar-toggler {
    border-color: var(--theme-primary) !important;
    background: rgba(255, 20, 147, 0.1) !important;
}

.theme-celebration .navbar-toggler:focus {
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.4) !important;
}

.theme-celebration .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 20, 147, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ---- Off-canvas (mobile nav) ---- */
.theme-celebration .offcanvas {
    background: linear-gradient(135deg, #FFE5F1 0%, #F5E6FF 100%) !important;
    border-left: 3px solid var(--theme-orange) !important;
    box-shadow: -4px 0 18px rgba(255, 20, 147, 0.25) !important;
}

.theme-celebration .offcanvas-header {
    border-bottom: 2px solid var(--theme-orange) !important;
}

.theme-celebration .btn-close {
    filter: none !important;
    color: var(--theme-text) !important;
    opacity: 0.8 !important;
}

.theme-celebration .btn-close:hover {
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

.theme-celebration .mobile-nav-section .btn {
    background: linear-gradient(45deg, var(--theme-primary), var(--theme-orange), var(--theme-gold)) !important;
    border: 3px solid var(--theme-gold) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.3) !important;
}

.theme-celebration .mobile-nav-section .btn:hover {
    background: linear-gradient(45deg, var(--theme-purple), var(--theme-cyan), var(--theme-gold)) !important;
    box-shadow: 0 8px 28px rgba(139, 0, 255, 0.4) !important;
    transform: translateY(-1px) !important;
}

.theme-celebration .mobile-nav-header {
    color: var(--theme-purple) !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}

.theme-celebration .mobile-nav-item {
    color: var(--theme-text) !important;
    font-weight: 600 !important;
}

.theme-celebration .mobile-nav-item:hover {
    color: var(--theme-primary) !important;
}

.theme-celebration .mobile-nav-item i {
    color: var(--theme-primary) !important;
}

/* ---- Footer ---- */
.theme-celebration .footer {
    background: linear-gradient(90deg, #FFE5F1 0%, #F5E6FF 50%, #E6F3FF 100%) !important;
    border-top: 3px solid var(--theme-orange) !important;
    box-shadow: 0 -4px 18px rgba(255, 20, 147, 0.2) !important;
}

.theme-celebration .footer p {
    color: var(--theme-text) !important;
    font-weight: 600 !important;
}

/* Use a * to override inline style= on <i> tags (Issue 11) */
.theme-celebration .footer a,
.theme-celebration .footer a * {
    color: var(--theme-purple) !important;
    font-weight: 700 !important;
}

.theme-celebration .footer a:hover,
.theme-celebration .footer a:hover * {
    color: var(--theme-primary) !important;
}

/* ---- Modals ---- */
.theme-celebration .modal-backdrop {
    display: none;
}

.theme-celebration .modal-content {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 3px solid var(--theme-orange) !important;
    box-shadow: 0 0 35px rgba(255, 20, 147, 0.35) !important;
    border-radius: 24px !important;
    backdrop-filter: blur(10px);
}

/* Transparent header — gradient causes cramped edges */
.theme-celebration .modal-header {
    background: transparent !important;
    border-bottom: 2px solid var(--theme-orange) !important;
    border-radius: 21px 21px 0 0 !important;
    padding: 1.5rem 1.5rem 0.5rem !important;
}

.theme-celebration .modal-title {
    color: var(--theme-purple) !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}

.theme-celebration .modal-body {
    background: transparent !important;
    color: var(--theme-text) !important;
    padding: 1rem 1.5rem !important;
}

/* Transparent footer — gradient causes cramped edges */
.theme-celebration .modal-footer {
    background: transparent !important;
    border-top: 2px solid var(--theme-orange) !important;
    border-radius: 0 0 21px 21px !important;
    padding: 0.5rem 1.5rem 1.5rem !important;
}

.theme-celebration .modal .btn-secondary {
    background: linear-gradient(45deg, var(--theme-purple), var(--theme-cyan)) !important;
    border: 2px solid var(--theme-purple) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.theme-celebration .modal .btn-secondary:hover {
    background: linear-gradient(45deg, var(--theme-cyan), var(--theme-purple)) !important;
    border-color: var(--theme-cyan) !important;
    box-shadow: 0 6px 20px rgba(0, 206, 209, 0.4) !important;
}

/* ---- Spreadsheet Modal (#ssModal) — complete theme opt-out ---- */
/* Reset all text and visuals to neutral dark-on-white */
.theme-celebration #ssModal *,
.theme-celebration #ssModal h1,
.theme-celebration #ssModal h2,
.theme-celebration #ssModal h3,
.theme-celebration #ssModal h4,
.theme-celebration #ssModal h5,
.theme-celebration #ssModal h6,
.theme-celebration #ssModal p,
.theme-celebration #ssModal small,
.theme-celebration #ssModal .text-muted {
    color: #212529 !important;
    text-shadow: none !important;
    filter: none !important;
}

/* CRITICAL: Icons inside buttons must inherit button color, not the wildcard */
.theme-celebration #ssModal .btn i,
.theme-celebration #ssModal .btn .bi {
    color: inherit !important;
}

/* CRITICAL: Restore danger red for X delete-row buttons */
.theme-celebration #ssModal .text-danger,
.theme-celebration #ssModal .text-danger i,
.theme-celebration #ssModal .text-danger .bi {
    color: #dc3545 !important;
}

/* CRITICAL: Strip all button chrome from X delete buttons */
.theme-celebration #ssModal .spreadsheet-delete-row {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* Modal shell — neutral white */
.theme-celebration #ssModal .modal-content {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: none !important;
}

.theme-celebration #ssModal .modal-header {
    background-color: transparent !important;
    border-bottom: 1px solid #dee2e6 !important;
    border-radius: 0 !important;
    padding: 1rem !important;
}

.theme-celebration #ssModal .modal-body {
    background-color: transparent !important;
    padding: 1rem !important;
}

.theme-celebration #ssModal .modal-footer {
    background-color: transparent !important;
    border-top: 1px solid #dee2e6 !important;
    border-radius: 0 !important;
    padding: 0.75rem !important;
}

/* Apply Changes — theme primary fill */
.theme-celebration #ssModal .btn-primary {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-purple) 100%) !important;
    border: 1px solid var(--theme-primary) !important;
    color: #ffffff !important;
    border-radius: var(--theme-radius-btn) !important;
    padding: 0.25rem 0.75rem !important;
    font-weight: 600 !important;
    box-shadow: 0 0 8px rgba(255, 20, 147, 0.4) !important;
    transform: none !important;
    animation: none !important;
}

.theme-celebration #ssModal .btn-primary:hover {
    background: linear-gradient(135deg, var(--theme-purple) 0%, var(--theme-primary) 100%) !important;
    box-shadow: 0 0 14px rgba(255, 20, 147, 0.6) !important;
    transform: none !important;
}

/* Add Row — solid violet fill (not rgba black — looks off-theme) */
.theme-celebration #ssModal .btn-outline-secondary {
    color: #ffffff !important;
    border: 1px solid var(--theme-purple) !important;
    background: var(--theme-purple) !important;
    border-radius: var(--theme-radius-btn) !important;
    padding: 0.25rem 0.75rem !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    transform: none !important;
}

.theme-celebration #ssModal .btn-outline-secondary:hover {
    background: var(--theme-purple-mid) !important;
    border-color: var(--theme-purple-mid) !important;
    box-shadow: 0 0 8px rgba(139, 0, 255, 0.4) !important;
    color: #ffffff !important;
    transform: none !important;
}

/* Cancel — orange accent */
.theme-celebration #ssModal .btn-outline-danger {
    color: var(--theme-orange) !important;
    border: 1px solid var(--theme-orange) !important;
    background: transparent !important;
    border-radius: var(--theme-radius-btn) !important;
    padding: 0.25rem 0.75rem !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    transform: none !important;
}

.theme-celebration #ssModal .btn-outline-danger:hover {
    background: rgba(255, 107, 53, 0.12) !important;
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.3) !important;
    color: var(--theme-orange) !important;
    transform: none !important;
}

/* Table inputs — keep neutral */
.theme-celebration #ssModal input,
.theme-celebration #ssModal .form-control {
    background-color: transparent !important;
    border-color: transparent !important;
    color: #212529 !important;
    box-shadow: none !important;
    font-size: inherit !important;
}
