/* Coastal Beach Theme - Ocean and sandy beach vibes with lighter balance */
.theme-coastal {
    --primary-color: #00acc1;
    background: linear-gradient(135deg, #fff8e1 0%, #f3e5ab 20%, #e0f7ff 40%, #b3e5fc 60%, #81d4fa 80%, #4fc3f7 100%) !important;
    color: #0d47a1 !important;
    min-height: 100vh !important;
}

/* Apply background to body when theme is active */
body.theme-coastal {
    background: linear-gradient(135deg, #fff8e1 0%, #f3e5ab 20%, #e0f7ff 40%, #b3e5fc 60%, #81d4fa 80%, #4fc3f7 100%) !important;
    color: #0d47a1 !important;
    min-height: 100vh !important;
}

/* Force page background to show gradient */
.theme-coastal,
.theme-coastal body,
.theme-coastal html {
    background: linear-gradient(135deg, #fff8e1 0%, #f3e5ab 20%, #e0f7ff 40%, #b3e5fc 60%, #81d4fa 80%, #4fc3f7 100%) !important;
    background-attachment: fixed !important;
}

/* Ensure containers have transparent backgrounds */
.theme-coastal .container,
.theme-coastal .container-narrow,
.theme-coastal main,
.theme-coastal .py-2,
.theme-coastal .py-md-5,
.theme-coastal .py-4 {
    background: transparent !important;
}

.theme-coastal .card {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 3px solid #f4a460 !important;
    box-shadow: 0 12px 30px rgba(244, 164, 96, 0.3), 0 6px 20px rgba(255, 218, 185, 0.4) !important;
    border-radius: 25px !important;
    backdrop-filter: blur(15px);
    position: relative;
}

.theme-coastal .card::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #f4a460, #ffdab9, #00acc1, #f4a460);
    border-radius: 28px;
    z-index: -1;
    opacity: 0.7;
}

.theme-coastal .card-body {
    background: transparent !important;
}

/* Form inputs with coastal styling */
.theme-coastal .form-control,
.theme-coastal .form-select,
.theme-coastal textarea {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid #f4a460 !important;
    color: #01579b !important;
    border-radius: 15px !important;
    box-shadow: 0 4px 20px rgba(244, 164, 96, 0.3) !important;
    font-size: 16px !important;
    font-weight: 500 !important;
}

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

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

.theme-coastal .form-control:focus,
.theme-coastal .form-select:focus,
.theme-coastal textarea:focus {
    border-color: #00acc1 !important;
    box-shadow: 0 0 25px rgba(0, 172, 193, 0.5), 0 4px 20px rgba(38, 198, 218, 0.2) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #01579b !important;
}

.theme-coastal .form-label,
.theme-coastal .card-title,
.theme-coastal h1,
.theme-coastal h2,
.theme-coastal h3,
.theme-coastal h4,
.theme-coastal h5,
.theme-coastal h6 {
    color: #01579b !important;
    font-weight: 700 !important;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.6);
    letter-spacing: -0.01em;
}

/* Coastal text colors */
.theme-coastal p,
.theme-coastal .card-text,
.theme-coastal .ql-editor {
    color: #0d47a1 !important;
    font-weight: 500 !important;
}

.theme-coastal .btn-primary,
.theme-coastal button[type="submit"] {
    background: linear-gradient(45deg, #2980b9, #3498db, #5dade2) !important;
    border: 2px solid #2980b9 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 20px rgba(41, 128, 185, 0.4), 0 3px 10px rgba(52, 152, 219, 0.3) !important;
    border-radius: 20px !important;
    text-shadow: none !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    min-height: 48px !important;
    position: relative;
    overflow: hidden;
}

.theme-coastal .btn-primary::before,
.theme-coastal button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.8s ease;
}

.theme-coastal .btn-primary:hover::before,
.theme-coastal button[type="submit"]:hover::before {
    left: 100%;
}

/* Header and Footer Styling for Coastal Theme */
.theme-coastal .navbar {
    background: linear-gradient(135deg, #87ceeb 0%, #a8ccda 50%, #6ba3d6 100%) !important;
    border-bottom: 3px solid #00acc1 !important;
    box-shadow: 0 4px 15px rgba(0, 172, 193, 0.3) !important;
}

.theme-coastal .navbar-brand {
    font-weight: 700 !important;
}

/* Logo filter — light sand (#d4aa60) + matching light glow to echo text shadow */
.theme-coastal .navbar-brand img {
    filter: brightness(0) saturate(100%) invert(75%) sepia(30%) saturate(600%) hue-rotate(5deg) brightness(95%) contrast(100%) drop-shadow(0 0 6px rgba(255, 255, 255, 0.9)) drop-shadow(0 1px 3px rgba(255, 255, 255, 0.7)) !important;
    transition: filter 0.3s ease !important;
}

/* Hover: "Grasshopper" brightens to medium teal — same family as footer links */
.theme-coastal .navbar-brand:hover .brand-text-primary {
    color: #00acc1 !important;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8) !important;
}

/* "Signup" + logo hold steady */
.theme-coastal .navbar-brand:hover .brand-text-white {
    color: #d4aa60 !important;
}

.theme-coastal .navbar-brand:hover img {
    filter: brightness(0) saturate(100%) invert(75%) sepia(30%) saturate(600%) hue-rotate(5deg) brightness(95%) contrast(100%) drop-shadow(0 1px 4px rgba(255, 255, 255, 0.8)) !important;
}

/* "Grasshopper" = dark teal, white glow shadow matching footer text style */
.theme-coastal .brand-text-primary {
    color: #005f73 !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6) !important;
    transition: color 0.3s ease, text-shadow 0.3s ease !important;
}

/* "Signup" + logo = sandy gold with light glow shadow */
.theme-coastal .brand-text-white {
    color: #d4aa60 !important;
    text-shadow: 0 1px 5px rgba(255, 255, 255, 0.7) !important;
    transition: color 0.3s ease !important;
}

.theme-coastal .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.7) !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

.theme-coastal .navbar-toggler:focus {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4) !important;
}

.theme-coastal .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, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.theme-coastal .offcanvas {
    background: linear-gradient(135deg, #87ceeb 0%, #a8ccda 50%, #6ba3d6 100%) !important;
    border-left: 3px solid #00acc1 !important;
    box-shadow: -4px 0 15px rgba(0, 172, 193, 0.3) !important;
}

.theme-coastal .offcanvas-header {
    border-bottom: 2px solid #6ba3d6 !important;
}

/* Dashboard/Login — ID selector for guaranteed specificity win */
.theme-coastal #mobileNav .btn-primary {
    background: #005f73 !important;
    background-image: none !important;
    border-color: #005f73 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    animation: none !important;
}

.theme-coastal #mobileNav .btn-primary::before {
    display: none !important;
}

.theme-coastal #mobileNav .btn-primary:hover {
    background: #004d5e !important;
    background-image: none !important;
    border-color: #004d5e !important;
    color: #ffffff !important;
    transform: none !important;
}

/* Logout — dark teal outline */
.theme-coastal #mobileNav .btn-outline-secondary {
    background: transparent !important;
    border: 2px solid #005f73 !important;
    color: #005f73 !important;
}

.theme-coastal #mobileNav .btn-outline-secondary:hover {
    background: rgba(0, 95, 115, 0.15) !important;
    color: #005f73 !important;
}

.theme-coastal .btn-close {
    filter: none !important;
    color: #01579b !important;
    opacity: 0.8 !important;
}

.theme-coastal .btn-close:hover {
    opacity: 1 !important;
}

.theme-coastal .mobile-nav-section .btn {
    background: linear-gradient(45deg, #6ba3d6, #87ceeb, #a8ccda) !important;
    border: 2px solid #87ceeb !important;
    color: #2c5f6b !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 20px rgba(135, 206, 235, 0.3), 0 3px 10px rgba(168, 204, 218, 0.2) !important;
}

.theme-coastal .mobile-nav-section .btn:hover {
    background: linear-gradient(45deg, #87ceeb, #a8ccda, #6ba3d6) !important;
    box-shadow: 0 8px 25px rgba(135, 206, 235, 0.4), 0 4px 12px rgba(168, 204, 218, 0.3) !important;
    transform: translateY(-2px) !important;
}

.theme-coastal .mobile-nav-header {
    color: #01579b !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6) !important;
}

.theme-coastal .mobile-nav-item {
    color: #01579b !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6) !important;
}

.theme-coastal .mobile-nav-item:hover {
    color: #00acc1 !important;
    text-shadow: 0 0 8px rgba(0, 172, 193, 0.6) !important;
}

.theme-coastal .mobile-nav-item i {
    color: #00acc1 !important;
}

.theme-coastal .footer {
    background: linear-gradient(135deg, #87ceeb 0%, #a8ccda 50%, #6ba3d6 100%) !important;
    border-top: 3px solid #00acc1 !important;
    box-shadow: 0 -4px 15px rgba(0, 172, 193, 0.3) !important;
}

.theme-coastal .footer p {
    color: #01579b !important;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6) !important;
    font-weight: 600 !important;
}

.theme-coastal .footer a {
    color: #00acc1 !important;
    text-shadow: 0 0 5px rgba(0, 172, 193, 0.4) !important;
    font-weight: 600 !important;
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease !important;
    display: inline-block;
}

.theme-coastal .footer a:hover {
    color: #006064 !important;
    text-shadow: 0 0 14px rgba(0, 172, 193, 0.8), 0 0 24px rgba(38, 198, 218, 0.4) !important;
    transform: translateY(-2px) !important;
}

.theme-coastal .footer a * {
    transition: color 0.3s ease !important;
}

.theme-coastal .footer a:hover * {
    color: #006064 !important;
}

.theme-coastal #submitBtn:hover,
.theme-coastal .btn-primary:hover,
.theme-coastal button[type="submit"]:hover {
    background: linear-gradient(45deg, #1a6fa0, #2980b9, #3498db) !important;
    border-color: #1a6fa0 !important;
    box-shadow: 0 8px 25px rgba(41, 128, 185, 0.5), 0 4px 15px rgba(52, 152, 219, 0.4) !important;
    transform: translateY(-2px) scale(1.02);
    transition: all 0.3s ease !important;
    color: #ffffff !important;
}

.theme-coastal .list-group-item {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid #ffdab9 !important;
    color: #01579b !important;
    margin-bottom: 10px !important;
    border-radius: 18px !important;
    font-weight: 500 !important;
    position: relative;
    overflow: hidden;
}

.theme-coastal .list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, #87ceeb, #b0e0e6, #e0f6ff);
}

.theme-coastal .list-group-item:hover {
    background: rgba(224, 247, 255, 0.9) !important;
    box-shadow: 0 8px 25px rgba(0, 172, 193, 0.3) !important;
    transform: translateY(-2px);
    border-color: #00acc1 !important;
}

.theme-coastal .form-check-input {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 3px solid #26c6da !important;
    border-radius: 4px !important;
    width: 20px !important;
    height: 20px !important;
}

/* Radio buttons should be circular */
.theme-coastal .form-check-input[type="radio"] {
    border-radius: 50% !important;
}

/* Solid fill on checked radio — suppress Bootstrap's inner white dot image */
.theme-coastal .form-check-input[type="radio"]:checked {
    background-image: none !important;
}

.theme-coastal .form-check-input:checked {
    background-color: #00acc1 !important;
    border-color: #00acc1 !important;
    box-shadow: 0 0 15px rgba(0, 172, 193, 0.6) !important;
}

.theme-coastal .form-check-label {
    color: #01579b !important;
    font-weight: 500 !important;
}

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

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

.theme-coastal .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-coastal .form-check.d-inline-block:not(.form-switch) {
    display: inline-flex !important;
}

.theme-coastal .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: #b3e5fc !important;
    border: 2px solid #4dd0e1 !important;
    border-radius: 2em !important;
    width: 2em !important;
    height: 1em !important;
}

.theme-coastal .form-switch .form-check-input:checked {
    background-color: #00acc1 !important;
    border-color: #00acc1 !important;
    box-shadow: 0 0 15px rgba(0, 172, 193, 0.4) !important;
}

.theme-coastal .text-muted {
    color: #0277bd !important;
    font-weight: 500 !important;
}

.theme-coastal .alert {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 3px solid #26c6da !important;
    color: #01579b !important;
    box-shadow: 0 8px 25px rgba(38, 198, 218, 0.3) !important;
    border-radius: 20px !important;
}

/* Button variants */
.theme-coastal .btn-secondary {
    background: linear-gradient(45deg, #00acc1, #26c6da) !important;
    border: 2px solid #00acc1 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 20px rgba(0, 172, 193, 0.3) !important;
    border-radius: 18px !important;
    transition: all 0.3s ease !important;
}

.theme-coastal .btn-secondary:hover,
.theme-coastal .btn-secondary:active,
.theme-coastal .btn-secondary:focus {
    background: linear-gradient(45deg, #26c6da, #00acc1) !important;
    border-color: #26c6da !important;
    box-shadow: 0 8px 25px rgba(38, 198, 218, 0.4) !important;
    transform: translateY(-2px);
    color: #ffffff !important;
}

.theme-coastal .btn-outline-primary {
    color: #00acc1 !important;
    border-color: #00acc1 !important;
    border-width: 2px !important;
    border-radius: 18px !important;
    font-weight: 600 !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

.theme-coastal .btn-outline-primary:hover {
    background: #00acc1 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(0, 172, 193, 0.4) !important;
    transform: translateY(-2px);
}

/* Active/Checked state for button toggle groups */
.theme-coastal .btn-check:checked + .btn-outline-primary,
.theme-coastal .btn-outline-primary:active,
.theme-coastal .btn-outline-primary.active {
    background: linear-gradient(135deg, #00acc1, #26c6da) !important;
    border-color: #00acc1 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 172, 193, 0.5), inset 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    font-weight: 700 !important;
    transform: translateY(0);
}

/* Icons inside active/checked buttons should be white */
.theme-coastal .btn-check:checked + .btn-outline-primary .bi,
.theme-coastal .btn-outline-primary:active .bi,
.theme-coastal .btn-outline-primary.active .bi {
    color: #ffffff !important;
}

.theme-coastal .btn-outline-secondary {
    color: #006064 !important;
    border-color: #006064 !important;
    border-width: 2px !important;
    border-radius: 18px !important;
    font-weight: 600 !important;
    background-color: rgba(0, 172, 193, 0.08) !important;
}

.theme-coastal .btn-outline-secondary:hover {
    background-color: #006064 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(0, 96, 100, 0.3) !important;
    transform: translateY(-2px);
}

/* Form sections */
.theme-coastal .form-section-respondent,
.theme-coastal .form-section-main-options,
.theme-coastal .form-section-additional {
    border-color: #a8ccda !important;
    box-shadow: 0 8px 25px rgba(168, 204, 218, 0.3) !important;
    border-radius: 25px !important;
}

.theme-coastal .form-section-header {
    background: linear-gradient(45deg, #e6f3ff, #f0f8ff, #fff8e1) !important;
    color: #2c5f6b !important;
    border-bottom: 2px solid #a8ccda !important;
    border-radius: 22px 22px 0 0 !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    padding: 1rem !important;
}

/* Required asterisk */
.theme-coastal .required-asterisk {
    color: #ff6f00 !important;
    font-weight: bold !important;
}

/* Placeholder text */
.theme-coastal ::placeholder {
    color: #01579b !important;
    opacity: 0.7 !important;
}

.theme-coastal .form-control::placeholder,
.theme-coastal textarea::placeholder {
    color: #01579b !important;
    opacity: 0.7 !important;
}

/* Fix dark gray text in form sections */
.theme-coastal [style*="color: #495057"],
.theme-coastal [style*="color:#495057"] {
    color: #2d3748 !important;
}

.theme-coastal .bi[style*="color: #495057"],
.theme-coastal .bi[style*="color:#495057"] {
    color: #00acc1 !important;
}

/* More specific override for the people icon */
.theme-coastal .bi-people-fill[style*="color: #495057"],
.theme-coastal .bi-people-fill[style*="color:#495057"],
.theme-coastal i.bi-people-fill[style*="color: #495057"],
.theme-coastal i.bi-people-fill[style*="color:#495057"] {
    color: #00acc1 !important;
}

/* Override the max signups icon class */
.theme-coastal .max-signups-icon {
    color: #00acc1 !important;
}

/* Target the specific max signups icon location */
.theme-coastal #maxSignupsHeader .bi-people-fill,
.theme-coastal #maxSignupsHeader i.bi-people-fill {
    color: #00acc1 !important;
}

/* Event detail icons - use coastal teal */
.theme-coastal .bi-calendar-event-fill[style*="color: var(--primary-color)"],
.theme-coastal .bi-clock-fill[style*="color: var(--primary-color)"],
.theme-coastal .bi-geo-alt-fill[style*="color: var(--primary-color)"],
.theme-coastal .bi-calendar-event-fill,
.theme-coastal .bi-clock-fill,
.theme-coastal .bi-geo-alt-fill {
    color: #00acc1 !important;
}

/* Override any inline styles on the max signups header */
.theme-coastal #maxSignupsHeader span[style*="color: #495057"],
.theme-coastal #maxSignupsHeader span[style*="color:#495057"] {
    color: #2d3748 !important;
}

/* Ocean wave animations */
.theme-coastal .btn,
.theme-coastal .form-control,
.theme-coastal .list-group-item {
    transition: all 0.3s ease !important;
}

/* Gentle wave animation */
.theme-coastal .card {
    animation: oceanWave 4s ease-in-out infinite;
}

@keyframes oceanWave {
    0%, 100% {
        box-shadow: 0 12px 30px rgba(0, 172, 193, 0.3), 0 6px 20px rgba(77, 208, 225, 0.2);
    }
    50% {
        box-shadow: 0 15px 35px rgba(0, 172, 193, 0.4), 0 8px 25px rgba(77, 208, 225, 0.3);
    }
}

/* Coastal sparkle effect */
.theme-coastal .btn-primary {
    animation: coastalSparkle 3s ease-in-out infinite;
}

@keyframes coastalSparkle {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(0, 172, 193, 0.4), 0 4px 15px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 0 10px 30px rgba(0, 172, 193, 0.6), 0 6px 20px rgba(255, 255, 255, 0.4);
    }
}

/* Modal styling for Coastal theme */
.theme-coastal .modal-backdrop {
    display: none !important;
}

.theme-coastal .modal-content {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 2px solid #87ceeb !important;
    box-shadow: 0 0 25px rgba(135, 206, 235, 0.4) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(12px);
}

/* Taken/Disabled option styling - "Show taken options" feature */
.theme-coastal .list-group-item input:disabled + label {
    color: #0d47a1 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    text-decoration: line-through !important;
}

.theme-coastal .list-group-item input:disabled ~ small {
    color: #00acc1 !important;
    font-weight: 600 !important;
}

.theme-coastal .list-group-item:has(input:disabled) {
    background: rgba(129, 212, 250, 0.3) !important;
    border-color: rgba(244, 164, 96, 0.5) !important;
    opacity: 0.75 !important;
}

.theme-coastal .list-group-item:has(input:disabled):hover {
    background: rgba(129, 212, 250, 0.3) !important;
    border-color: rgba(244, 164, 96, 0.5) !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: 0 8px 22px rgba(135, 206, 235, 0.2) !important;
}

.theme-coastal .list-group-item:has(input:disabled)::before {
    background: linear-gradient(to bottom, rgba(0, 172, 193, 0.4), rgba(244, 164, 96, 0.4)) !important;
}
