/*
 * Cookie UI banner (visual testing)
 */

body.ggcu-modal-open {
    overflow: hidden;
}

.ggcu-banner {
    position: fixed;
    left: 16px;
    bottom: 16px;
    width: min(320px, calc(100vw - 32px));
    background: #ffffff;
    color: #111111;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    z-index: 9997;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ggcu-banner.ggcu-visible {
    opacity: 1;
    transform: translateY(0);
}

.ggcu-banner.ggcu-hidden {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.ggcu-media {
    width: 100%;
    line-height: 0;
}

.ggcu-media a {
    display: block;
}

.ggcu-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px 12px 0 0;
}

.ggcu-content {
    padding: 10px 12px;
}

.ggcu-text {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
}

.ggcu-text a {
    color: #111111;
    text-decoration: underline;
}

.ggcu-actions {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: stretch;
}

.ggcu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 7px 10px;
}

.ggcu-btn-accept {
    background: var(--gymgo-cta-bg, #fcee0a);
    color: #111111;
    font-weight: 700;
}

.ggcu-btn-reject {
    background: #ffffff;
    color: #222222;
    border: 1px solid rgba(0, 0, 0, 0.16);
}

.ggcu-btn-settings {
    background: transparent;
    color: #222222;
    text-decoration: underline;
}

.ggcu-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: grid;
    place-items: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.ggcu-modal.ggcu-modal--open {
    opacity: 1;
    pointer-events: auto;
}

.ggcu-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.ggcu-modal__panel {
    position: relative;
    width: min(460px, calc(100vw - 24px));
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 16px;
}

.ggcu-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.ggcu-modal__header h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
}

.ggcu-modal__close {
    border: 0;
    background: transparent;
    color: #111111;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.ggcu-modal__intro,
.ggcu-modal__policy {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #222222;
}

.ggcu-modal__groups {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.ggcu-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 10px;
    background: #ffffff;
}

.ggcu-setting__text {
    display: grid;
    gap: 2px;
}

.ggcu-setting__text strong {
    font-size: 13px;
    line-height: 1.2;
}

.ggcu-setting__text small {
    font-size: 12px;
    line-height: 1.35;
    color: #4b5563;
}

.ggcu-setting input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.ggcu-switch {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: #d1d5db;
    transition: background 0.2s ease;
}

.ggcu-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.ggcu-setting input:checked + .ggcu-switch {
    background: var(--gymgo-cta-bg, #fcee0a);
}

.ggcu-setting input:checked + .ggcu-switch::after {
    transform: translateX(18px);
}

.ggcu-setting--locked {
    background: #f9fafb;
}

.ggcu-setting--locked .ggcu-switch {
    background: #111111;
}

.ggcu-setting--locked .ggcu-switch::after {
    transform: translateX(18px);
}

.ggcu-modal__actions {
    margin-top: 12px;
    display: grid;
    gap: 6px;
}

.ggcu-modal__policy {
    margin-top: 10px;
}

.ggcu-modal__policy a {
    color: #111111;
    text-decoration: underline;
}

.ggcu-btn-settings:hover,
.ggcu-text a:hover {
    opacity: 0.75;
}

@media (max-width: 768px) {
    .ggcu-banner {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        border-radius: 12px 12px 0 0;
        border-left: 0;
        border-right: 0;
        border-bottom: 0;
    }

    .ggcu-content {
        padding: 8px 10px;
    }

    .ggcu-actions {
        gap: 3px;
    }

    .ggcu-btn {
        padding: 10px 10px;
    }

    .ggcu-modal {
        padding: 8px;
        align-items: end;
    }

    .ggcu-modal__panel {
        width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 90vh;
        overflow: auto;
        padding: 14px;
    }

    .ggcu-modal__header h3 {
        font-size: 17px;
    }
}
