/* Cookie consent — matches Ibiza Empleo public UI */

.ie-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(11, 13, 40, 0.96) 0%, #0b0d28 100%);
    color: #fff;
    box-shadow: 0 -10px 30px rgba(11, 13, 40, 0.22);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ie-cookie-banner[hidden] {
    display: none !important;
}

.ie-cookie-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
}

.ie-cookie-banner__copy {
    flex: 1 1 280px;
    min-width: 0;
}

.ie-cookie-banner__title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
}

.ie-cookie-banner__text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
}

.ie-cookie-banner__text a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ie-cookie-banner__text a:hover {
    color: var(--rts-primary, #34a853);
}

.ie-cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex: 0 1 auto;
}

.ie-cookie-banner .rts__btn {
    min-height: 40px;
    padding: 0.45rem 0.95rem;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.ie-cookie-banner .rts__btn.fill__btn {
    background: var(--rts-button-1, #34a853);
    border-color: var(--rts-button-1, #34a853);
    color: #fff;
}

.ie-cookie-banner .rts__btn.fill__btn:hover {
    filter: brightness(1.05);
    color: #fff;
}

.ie-cookie-banner .rts__btn.no__fill__btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
}

.ie-cookie-banner .rts__btn.no__fill__btn:hover {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.ie-cookie-banner .rts__btn.ie-cookie-banner__linkish {
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 2px;
    background: transparent;
}

/* Preference rows / switches (cookies page) */
.ie-cookie-pref {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.65rem 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(125, 128, 135, 0.18);
    border-radius: 12px;
    background: #fafbfc;
}

.ie-cookie-pref__meta {
    min-width: 0;
}

.ie-cookie-pref__label {
    display: block;
    margin: 0 0 0.2rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--rts-heading, #0b0d28);
}

.ie-cookie-pref__help {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--rts-para, #7d8087);
}

.ie-cookie-pref__status {
    display: inline-flex;
    align-items: center;
    margin-top: 0.4rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.ie-cookie-pref__status.is-on {
    background: rgba(52, 168, 83, 0.12);
    color: #1f7a38;
}

.ie-cookie-pref__status.is-off {
    background: rgba(125, 128, 135, 0.12);
    color: #667085;
}

.ie-cookie-pref__control {
    display: flex;
    align-items: flex-start;
    padding-top: 0.15rem;
}

.ie-cookie-switch {
    position: relative;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
}

.ie-cookie-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ie-cookie-switch__ui {
    display: block;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: #cbd5e1;
    border: 1px solid rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.ie-cookie-switch__ui::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
    transition: transform 0.15s ease;
}

.ie-cookie-switch input:checked + .ie-cookie-switch__ui {
    background: var(--rts-button-1, #34a853);
}

.ie-cookie-switch input:checked + .ie-cookie-switch__ui::after {
    transform: translateX(18px);
}

.ie-cookie-switch input:disabled + .ie-cookie-switch__ui {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--rts-button-1, #34a853);
}

.ie-cookie-switch input:focus-visible + .ie-cookie-switch__ui {
    outline: 2px solid rgba(52, 168, 83, 0.45);
    outline-offset: 2px;
}

body.ie-cookie-banner-open .rts__back__top {
    bottom: 110px;
}

/* Page preference cards on cookies.php */
.ie-cookie-page-panel {
    padding: 1.15rem 1.2rem 1.25rem;
    border: 1px solid rgba(125, 128, 135, 0.16);
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfcfd 0%, #fff 100%);
    box-shadow: 0 6px 18px rgba(11, 13, 40, 0.04);
}

.ie-cookie-page-divider {
    width: 100%;
    height: 0;
    margin: 0.35rem 0;
    border: 0;
    border-top: 1px solid rgba(125, 128, 135, 0.22);
}

.ie-cookie-page-prefs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ie-cookie-page-prefs .ie-cookie-pref {
    background: #fff;
}

.ie-cookie-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(125, 128, 135, 0.14);
}

.ie-cookie-page-actions .rts__btn {
    min-height: 44px;
    padding: 0.7rem 1.15rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ie-cookie-page-actions .rts__btn.fill__btn {
    background-color: var(--rts-button-1, #34a853);
    border: 1px solid var(--rts-button-1, #34a853);
    color: #fff;
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.22);
}

.ie-cookie-page-actions .rts__btn.fill__btn:hover,
.ie-cookie-page-actions .rts__btn.fill__btn:focus-visible {
    background-color: var(--rts-button-3, #0b0d28);
    border-color: var(--rts-button-3, #0b0d28);
    color: #fff;
    box-shadow: 0 6px 16px rgba(11, 13, 40, 0.18);
}

.ie-cookie-page-actions .rts__btn.no__fill__btn {
    background: #fff;
    border: 1px solid rgba(125, 128, 135, 0.32);
    color: var(--rts-heading, #0b0d28);
}

.ie-cookie-page-actions .rts__btn.no__fill__btn:hover,
.ie-cookie-page-actions .rts__btn.no__fill__btn:focus-visible {
    border-color: var(--rts-button-1, #34a853);
    color: var(--rts-button-1, #34a853);
    background: rgba(52, 168, 83, 0.06);
}

.ie-cookie-page-actions .rts__btn[data-cookie-reject]:hover,
.ie-cookie-page-actions .rts__btn[data-cookie-reject]:focus-visible {
    border-color: rgba(11, 13, 40, 0.35);
    color: var(--rts-heading, #0b0d28);
    background: #f4f6f5;
}

.ie-cookie-page-saved,
.ie-legal .ie-cookie-page-saved,
.ie-legal__body > .ie-cookie-page-saved {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.5rem !important;
    margin-bottom: 0 !important;
    padding: 0.7rem 0.95rem;
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(52, 168, 83, 0.28);
    background: linear-gradient(135deg, rgba(52, 168, 83, 0.12) 0%, rgba(236, 253, 243, 0.95) 100%);
    color: #027a48;
    font-size: 0.875rem;
    font-weight: 650;
    line-height: 1.4;
    box-shadow: 0 6px 18px rgba(52, 168, 83, 0.1);
    animation: ie-cookie-saved-in 0.28s ease;
}

.ie-cookie-page-saved[hidden] {
    display: none !important;
}

.ie-cookie-page-saved i {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 168, 83, 0.16);
    color: #1f7a38;
    font-size: 14px;
}

@keyframes ie-cookie-saved-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 575.98px) {
    .ie-cookie-page-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ie-cookie-page-actions .rts__btn {
        width: 100%;
    }
}

.ie-cookie-map-gate {
    width: 100%;
}

.ie-cookie-map-placeholder {
    display: block;
    width: 100%;
    min-height: 220px;
    padding: 1.5rem 1.35rem;
    border: 1px solid rgba(52, 168, 83, 0.22);
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(52, 168, 83, 0.08) 0%, rgba(248, 250, 252, 0.98) 48%, #fff 100%);
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
    box-sizing: border-box;
}

.ie-cookie-map-placeholder__inner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    max-width: 520px;
}

.ie-cookie-map-placeholder__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 168, 83, 0.14);
    color: var(--rts-button-1, #34a853);
    font-size: 1.15rem;
    box-shadow: inset 0 0 0 1px rgba(52, 168, 83, 0.12);
}

.ie-cookie-map-placeholder__copy {
    min-width: 0;
    flex: 1 1 auto;
}

.ie-cookie-map-placeholder__title {
    margin: 0 0 0.35rem;
    color: var(--rts-heading, #0b0d28);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
}

.ie-cookie-map-placeholder__text {
    margin: 0 0 0.95rem;
    color: var(--rts-para, #7d8087);
    font-size: 0.875rem;
    line-height: 1.55;
}

.ie-cookie-map-placeholder__btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    margin-top: 0.15rem;
    padding: 0.65rem 1.1rem !important;
    border-radius: 8px !important;
    font-family: inherit;
    font-size: 0.875rem !important;
    font-weight: 650 !important;
    line-height: 1.2;
    background-color: var(--rts-button-1, #34a853) !important;
    border: 1px solid var(--rts-button-1, #34a853) !important;
    color: #fff !important;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(52, 168, 83, 0.22);
}

.ie-cookie-map-placeholder__btn:hover,
.ie-cookie-map-placeholder__btn:focus-visible {
    background-color: var(--rts-button-3, #0b0d28) !important;
    border-color: var(--rts-button-3, #0b0d28) !important;
    color: #fff !important;
}

.ie-cookie-map-placeholder__btn i {
    font-size: 0.95rem;
}

.ie-cookie-map-placeholder__home {
    margin: 0.85rem 0 0;
    color: var(--rts-para, #7d8087);
    font-size: 0.875rem;
    line-height: 1.55;
}

.ie-cookie-map-placeholder__home a {
    display: block;
    margin-top: 0.35rem;
    color: var(--rts-heading, #0b0d28);
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ie-cookie-map-placeholder__home[hidden] {
    display: none !important;
}

.ie-cookie-map-placeholder--map {
    max-width: 360px;
    width: 100%;
    min-height: 0;
    padding: 1.25rem 1.2rem;
    text-align: center;
    margin: 0 auto;
}

.ie-cookie-map-placeholder--map .ie-cookie-map-placeholder__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: none;
    gap: 0.85rem;
}

.ie-cookie-map-placeholder--map .ie-cookie-map-placeholder__icon {
    margin: 0 auto;
}

.ie-cookie-map-placeholder--map .ie-cookie-map-placeholder__copy {
    width: 100%;
}

.ie-cookie-map-placeholder--map .ie-cookie-map-placeholder__text {
    margin-bottom: 0.75rem;
}

.ie-cookie-map-placeholder--map .ie-cookie-map-placeholder__btn {
    width: auto;
    max-width: 100%;
}

.ie-cookie-map-placeholder__link {
    display: block;
    margin-top: 0.85rem;
    color: var(--rts-para, #7d8087);
    font-size: 0.8125rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ie-cookie-map-placeholder__link:hover,
.ie-cookie-map-placeholder__link:focus-visible {
    color: var(--rts-heading, #0b0d28);
}

.ie-cookie-map-placeholder[hidden],
[data-cookie-content][hidden],
[data-cookie-placeholder][hidden] {
    display: none !important;
}

/* Quick cookie controls modal */
.ie-cookie-map-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    box-sizing: border-box;
}

.ie-cookie-map-modal[hidden] {
    display: none !important;
}

.ie-cookie-map-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 13, 40, 0.55);
    backdrop-filter: blur(2px);
}

.ie-cookie-map-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 580px;
    max-height: calc(100vh - 2.5rem);
    overflow: auto;
    padding: 1.35rem 1.2rem 1.15rem;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(16, 24, 40, 0.28);
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.ie-cookie-map-modal__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.06);
    color: #0b0d28;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ie-cookie-map-modal__close:hover,
.ie-cookie-map-modal__close:focus-visible {
    background: rgba(15, 23, 42, 0.12);
}

.ie-cookie-map-modal__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(52, 168, 83, 0.14);
    color: var(--rts-button-1, #34a853);
    font-size: 1.2rem;
    margin-bottom: 0.85rem;
}

.ie-cookie-map-modal__title {
    margin: 0 0 0.45rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rts-heading, #0b0d28);
    line-height: 1.3;
    padding-right: 2rem;
}

.ie-cookie-map-modal__text {
    margin: 0 0 1.1rem;
    color: var(--rts-para, #7d8087);
    font-size: 0.9rem;
    line-height: 1.55;
}

.ie-cookie-map-modal__prefs {
    margin-bottom: 1.15rem;
}

.ie-cookie-map-modal__prefs .ie-cookie-pref {
    background: #fff;
}

.ie-cookie-map-modal__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
}

.ie-cookie-map-modal__actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
}

.ie-cookie-map-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    min-height: 44px;
    padding: 0.7rem 1.1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ie-cookie-map-modal__btn i {
    font-size: 0.95rem;
}

.ie-cookie-map-modal__btn--primary {
    background-color: var(--rts-button-1, #34a853);
    border-color: var(--rts-button-1, #34a853);
    color: #fff;
    box-shadow: 0 6px 16px rgba(52, 168, 83, 0.22);
}

.ie-cookie-map-modal__btn--primary:hover,
.ie-cookie-map-modal__btn--primary:focus-visible {
    background-color: var(--rts-button-3, #0b0d28);
    border-color: var(--rts-button-3, #0b0d28);
    color: #fff;
}

.ie-cookie-map-modal__btn--secondary {
    background-color: #fff;
    border-color: rgba(15, 23, 42, 0.16);
    color: var(--rts-heading, #0b0d28);
}

.ie-cookie-map-modal__btn--secondary:hover,
.ie-cookie-map-modal__btn--secondary:focus-visible {
    background-color: #f8fafc;
    border-color: rgba(15, 23, 42, 0.28);
    color: var(--rts-heading, #0b0d28);
}

.ie-cookie-map-modal__btn--save {
    width: auto;
    min-width: 220px;
    align-self: center;
}

.ie-cookie-map-modal__btn--ghost {
    background-color: transparent;
    border-color: transparent;
    color: var(--rts-para, #7d8087);
    min-height: 40px;
    font-weight: 600;
    align-self: center;
    width: auto;
    min-width: 120px;
}

.ie-cookie-map-modal__btn--ghost:hover,
.ie-cookie-map-modal__btn--ghost:focus-visible {
    background-color: rgba(15, 23, 42, 0.04);
    color: var(--rts-heading, #0b0d28);
}

.ie-cookie-map-modal__saved {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0.85rem 0 0;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: rgba(52, 168, 83, 0.1);
    color: #1f7a38;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}

.ie-cookie-map-modal__saved[hidden] {
    display: none !important;
}

.ie-cookie-map-modal__footer {
    margin: 1rem 0 0;
    padding-top: 0.15rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--rts-para, #7d8087);
}

.ie-cookie-map-modal__footer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.ie-cookie-map-modal-open {
    overflow: hidden;
}

/* Full-page map explorer cookie gate */
.map-explorer-cookie-gate {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.72) 0%, rgba(248, 250, 252, 0.92) 100%);
    box-sizing: border-box;
}

.map-explorer-cookie-gate[hidden] {
    display: none !important;
}

.map-explorer-cookie-gate .ie-cookie-map-placeholder {
    width: auto;
    max-width: 360px;
    box-shadow: 0 18px 48px rgba(16, 24, 40, 0.14);
}

@media (max-width: 575.98px) {
    .ie-cookie-map-placeholder {
        min-height: 0;
        padding: 1.15rem 1rem;
    }

    .ie-cookie-map-placeholder__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .ie-cookie-map-placeholder__btn {
        width: 100%;
    }

    .ie-cookie-map-modal {
        padding: 1rem;
    }

    .ie-cookie-map-modal__panel {
        max-width: 520px;
        padding: 1.2rem 1rem 1.05rem;
    }

    .ie-cookie-map-modal__actions-row {
        grid-template-columns: 1fr;
    }

    .ie-cookie-map-modal__btn--save {
        width: 100%;
        min-width: 0;
    }

    .map-explorer-cookie-gate .ie-cookie-map-placeholder,
    .ie-cookie-map-placeholder--map {
        max-width: 300px;
    }
}

@media (max-width: 767.98px) {
    .ie-cookie-banner__inner {
        align-items: stretch;
    }

    .ie-cookie-banner__actions {
        width: 100%;
    }

    .ie-cookie-banner__actions .rts__btn {
        flex: 1 1 calc(50% - 0.25rem);
    }

    .ie-cookie-banner__actions .ie-cookie-banner__linkish {
        flex: 1 1 100%;
    }

    body.ie-cookie-banner-open .rts__back__top {
        bottom: 160px;
    }
}
