/**
 * Fluo Cloudflare Geo - Popup Styles
 * Style popup zmiany języka/waluty
 */

/* Overlay - tło popup */
.fluo-geo-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

.fluo-geo-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Kontener popup */
.fluo-geo-popup-container {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 420px;
    width: 90%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.fluo-geo-popup-overlay.active .fluo-geo-popup-container {
    transform: scale(1) translateY(0);
}

/* Przycisk zamknięcia */
.fluo-geo-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fluo-geo-popup-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: rotate(90deg);
}

/* Zawartość popup */
.fluo-geo-popup-content {
    padding: 32px 28px;
    text-align: center;
}

/* Ikona */
.fluo-geo-popup-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Tytuł */
.fluo-geo-popup-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

/* Wiadomość */
.fluo-geo-popup-message {
    font-size: 0.95rem;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Sugestia */
.fluo-geo-popup-suggestion {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #fff;
}

.fluo-geo-popup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.fluo-geo-popup-row:first-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.fluo-geo-popup-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Layout podziału wartości (Split Layout) */
/* Layout podziału wartości (Split Layout) */
.fluo-geo-split-layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* Col 1 (Right aligned), Col 2 (Center), Col 3 (Left aligned) */
    grid-template-areas:
        "L1 C1 R1"
        "L2 C2 R2";
    column-gap: 12px;
    row-gap: 2px;
    align-items: center;
}

/* Prosty layout dla waluty (jeden rząd) */
.fluo-geo-simple-layout {
    text-align: right;
    font-size: 0.95rem;
}

.fluo-geo-simple-layout .fluo-geo-text-primary {
    margin-bottom: 0;
}

/* Grid Items Positioning */
.fluo-geo-grid-item-l1 {
    grid-area: L1;
    justify-self: end;
    text-align: right;
}

.fluo-geo-grid-item-c1 {
    grid-area: C1;
    justify-self: center;
}

.fluo-geo-grid-item-r1 {
    grid-area: R1;
    justify-self: start;
    text-align: left;
}

.fluo-geo-grid-item-l2 {
    grid-area: L2;
    justify-self: end;
    text-align: right;
}

.fluo-geo-grid-item-c2 {
    grid-area: C2;
}

.fluo-geo-grid-item-r2 {
    grid-area: R2;
    justify-self: start;
    text-align: left;
}

/* Styles for text types */
.fluo-geo-text-primary {
    color: #1a1a2e;
    font-weight: 400;
}

strong.fluo-geo-text-primary {
    font-weight: 700;
}

.fluo-geo-text-secondary {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 400;
}

/* Arrow styling */
.fluo-geo-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    color: rgb(240, 240, 240);
    font-size: 1.1em;
}

/* Dark mode adjust */
@media (prefers-color-scheme: dark) {
    .fluo-geo-text-primary {
        color: #f0f0f0;
    }
}

/* Separator */
.fluo-geo-popup-separator {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
    margin: 16px 0;
    width: 100%;
}

@media (prefers-color-scheme: dark) {
    .fluo-geo-popup-separator {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* Sugestie - poprawki dla tabeli */
.fluo-geo-popup-suggestion .fluo-geo-text-primary {
    font-size: 0.9rem;
    margin-bottom: 1px;
    opacity: 0.95;
}

.fluo-geo-popup-suggestion .fluo-geo-text-secondary {
    font-size: 0.75rem;
    margin-bottom: 0;
}

/* Sekcje dwujęzyczne - ogólne */
.fluo-geo-popup-bilingual {
    margin-bottom: 16px;
}

.fluo-geo-popup-bilingual:last-of-type {
    margin-bottom: 20px;
}

/* Główny język (sugerowany - użytkownika) */
.fluo-geo-text-primary {
    display: block;
    margin-bottom: 4px;
}

.fluo-geo-popup-title .fluo-geo-text-primary {
    font-size: 1.2rem;
}

.fluo-geo-popup-message .fluo-geo-text-primary {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

/* Drugi język (obecny - strony) */
.fluo-geo-text-secondary {
    display: block;
    opacity: 0.7;
    font-weight: 400 !important;
    font-size: 0.85em;
    /* relative to parent */
}

.fluo-geo-popup-title .fluo-geo-text-secondary {
    font-size: 0.8rem;
    font-weight: 400;
}

.fluo-geo-popup-message .fluo-geo-text-secondary {
    font-size: 0.8rem;
}

/* Przyciski */
.fluo-geo-popup-buttons {
    display: flex;
    gap: 12px;
}

.fluo-geo-popup-buttons .btn {
    flex: 1;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1.3;
}

.fluo-geo-btn-text-primary {
    display: block;
    font-weight: 600;
}

.fluo-geo-btn-text-secondary {
    display: block;
    font-size: 0.8em;
    opacity: 0.8;
    font-weight: 400;
}

.fluo-geo-btn-accept {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.fluo-geo-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.fluo-geo-btn-decline {
    background: #f0f0f0;
    color: #555;
}

.fluo-geo-btn-decline:hover {
    background: #e5e5e5;
}

/* Responsywność */
@media (max-width: 480px) {
    .fluo-geo-popup-container {
        width: 95%;
        margin: 16px;
    }

    .fluo-geo-popup-content {
        padding: 24px 20px;
    }

    .fluo-geo-popup-buttons {
        flex-direction: column;
    }

    .fluo-geo-popup-icon {
        font-size: 40px;
    }

    .fluo-geo-popup-title {
        font-size: 1.1rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .fluo-geo-popup-container {
        background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
    }

    .fluo-geo-popup-title {
        color: #f0f0f0;
    }

    .fluo-geo-popup-message {
        color: #aaa;
    }

    .fluo-geo-popup-close {
        background: rgba(255, 255, 255, 0.1);
        color: #ccc;
    }

    .fluo-geo-popup-close:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
    }

    .fluo-geo-btn-decline {
        background: #2a2a3e;
        color: #ccc;
    }

    .fluo-geo-btn-decline:hover {
        background: #3a3a4e;
    }
}