/**
 * NOWN Cloudflare GEO Popup Redirect - Popup Styles
 *
 * Design aesthetic: NOWN website style
 * - Dark overlay background
 * - Centered white modal with sharp edges
 * - Clean, modern, minimal design
 * - Sans-serif typography
 * - Uppercase bold titles
 *
 * @package NOWN_Cloudflare_GEO_Popup_Redirect
 * @since 1.0.0
 */

/* ==========================================================================
   Overlay
   ========================================================================== */

.nown-geo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* ==========================================================================
   Popup Modal
   ========================================================================== */

.nown-geo-popup {
    position: relative;
    background: #EAE6DF;
    max-width: 400px;
    width: 90%;
    padding: 40px;
    text-align: center;
    border-radius: 0; /* Sharp edges - NOWN aesthetic */
    box-sizing: border-box;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   Icon/Logo
   ========================================================================== */

.nown-geo-icon {
    display: block;
    max-height: 60px;
    width: auto;
    margin: 0 auto 24px auto;
}

/* ==========================================================================
   Title
   ========================================================================== */

.nown-geo-title {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000;
    margin: 0 0 16px 0;
    line-height: 1.2;
}

/* ==========================================================================
   Message
   ========================================================================== */

.nown-geo-message {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9375rem;
    font-weight: 400;
    color: #666;
    margin: 0 0 28px 0;
    line-height: 1.6;
}

/* ==========================================================================
   Redirect Button (Primary CTA)
   ========================================================================== */

.nown-geo-btn-redirect {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: 0; /* Sharp edges */
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    box-sizing: border-box;
}

.nown-geo-btn-redirect:hover,
.nown-geo-btn-redirect:focus {
    background: #333;
    color: #fff;
    text-decoration: none;
    outline: none;
}

.nown-geo-btn-redirect:active {
    background: #111;
}

/* ==========================================================================
   Stay Button (Secondary Link)
   ========================================================================== */

.nown-geo-btn-stay {
    display: inline-block;
    margin-top: 16px;
    padding: 8px 16px;
    background: transparent;
    color: #333;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.8125rem;
    font-weight: 400;
    text-decoration: none;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.nown-geo-btn-stay:hover,
.nown-geo-btn-stay:focus {
    color: #000;
    text-decoration: underline;
    outline: none;
}

/* ==========================================================================
   Debug Panel
   ========================================================================== */

.nown-geo-debug-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 320px;
    width: calc(100% - 40px);
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0; /* Sharp edges to match NOWN aesthetic */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #333;
    z-index: 999998; /* High but below overlay */
    box-sizing: border-box;
}

.nown-geo-debug-panel strong {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #000;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.nown-geo-debug-panel code {
    background: #f5f5f5;
    padding: 2px 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.6875rem;
    color: #c7254e;
}

/* ==========================================================================
   Debug Badge
   ========================================================================== */

.nown-geo-debug-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e53935;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 0;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media screen and (max-width: 480px) {
    .nown-geo-popup {
        padding: 32px 24px;
        width: 95%;
    }

    .nown-geo-title {
        font-size: 1.25rem;
    }

    .nown-geo-message {
        font-size: 0.875rem;
    }

    .nown-geo-btn-redirect {
        padding: 12px 20px;
        font-size: 0.8125rem;
    }

    .nown-geo-debug-panel {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        width: auto;
    }
}

/* ==========================================================================
   Animation (Optional Enhancement)
   ========================================================================== */

.nown-geo-overlay {
    animation: nownGeoFadeIn 0.3s ease-out;
}

.nown-geo-popup {
    animation: nownGeoSlideIn 0.3s ease-out;
}

@keyframes nownGeoFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes nownGeoSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Hidden State (for JS toggle)
   ========================================================================== */

.nown-geo-overlay.nown-geo-hidden {
    display: none;
}

/* ==========================================================================
   Accessibility - Reduce Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .nown-geo-overlay,
    .nown-geo-popup {
        animation: none;
    }
}
