/**
 * NVSP Sloganhunt Plugin - Modal & Overlay Styling
 *
 * @package     NVSP.Plugin
 * @subpackage  System.Sloganhunt
 * @copyright   Copyright (C) 2024 NVSP. All rights reserved.
 * @license     GNU General Public License version 2 or later
 */

/* ============================================
   NVSP 40 JAAR OVERLAY MODAL
   ============================================ */

/* Overlay achtergrond - Oranje gradient */
.nvsp-overlay-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, #ffe4b3, #ffc99e, #ffb088);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: nvspOverlayFadeIn 0.6s ease forwards;
    padding: 20px;
    overflow: hidden;
}

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

.nvsp-overlay-modal.nvsp-closing {
    animation: nvspOverlayFadeOut 0.3s ease forwards;
}

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

/* Content box - Witte frosted glass box */
.nvsp-overlay-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: nvspOverlaySlideUp 0.4s ease-out;
    position: relative;
    padding: 0;
}

@keyframes nvspOverlaySlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close button */
.nvsp-overlay-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
    color: #666;
}

.nvsp-overlay-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
    color: #333;
}

/* Logo section */
.nvsp-overlay-logo-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px 30px 30px;
    text-align: center;
    border-radius: 20px 20px 0 0;
}

.nvsp-overlay-logo {
    max-width: 90%;
    height: auto;
    max-height: 150px;
    display: block;
    margin: 0 auto;
}

/* Body section */
.nvsp-overlay-body {
    padding: 35px 40px;
    text-align: center;
}

/* Title */
.nvsp-overlay-title {
    font-size: 28px;
    font-weight: bold;
    color: #0033A0;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

/* Text */
.nvsp-overlay-text {
    font-size: 16px;
    color: #444;
    line-height: 1.7;
    margin: 0 0 30px 0;
}

/* ============================================
   BUTTONS
   ============================================ */

/* Buttons container */
.nvsp-overlay-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* Base button styling */
.nvsp-btn {
    padding: 16px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-family: inherit;
    line-height: 1.2;
}

/* Primary button - Oranje "Doe mee!" */
.nvsp-btn-primary {
    background: linear-gradient(135deg, #FF6600 0%, #FF8833 100%);
    color: white !important;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
    border: 2px solid transparent;
}

.nvsp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
    color: white !important;
    text-decoration: none;
}

/* Secondary button - Wit "Nee, bedankt" */
.nvsp-btn-secondary {
    background: white;
    color: #0033A0 !important;
    border: 2px solid #0033A0;
    box-shadow: 0 2px 10px rgba(0, 51, 160, 0.1);
}

.nvsp-btn-secondary:hover {
    background: #0033A0;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 51, 160, 0.3);
}

/* ============================================
   TERMS LINK
   ============================================ */
.nvsp-overlay-terms {
    text-align: center;
    padding-top: 15px;
    font-size: 14px;
}

.nvsp-overlay-terms a {
    color: #0033A0;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.nvsp-overlay-terms a:hover {
    border-bottom-color: #0033A0;
}

/* ============================================
   CONFETTI ANIMATIE
   ============================================ */
.nvsp-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100000;
    overflow: hidden;
}

.nvsp-confetti-piece {
    position: absolute;
    top: -50px;
    animation: nvspConfettiFall linear infinite;
}

/* Verschillende confetti vormen */
.nvsp-confetti-square {
    width: 8px;
    height: 8px;
}

.nvsp-confetti-rectangle {
    width: 12px;
    height: 6px;
}

.nvsp-confetti-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.nvsp-confetti-ribbon {
    width: 15px;
    height: 4px;
    border-radius: 2px;
}

@keyframes nvspConfettiFall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) rotate(360deg);
        opacity: 0.7;
    }
}

/* ============================================
   BALLONNEN ANIMATIE - 100% VLOEIEND & HERHALEND
   ============================================ */
.nvsp-balloon {
    position: fixed;
    bottom: -100px;
    width: 50px;
    height: 65px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    z-index: 100000;
    pointer-events: none;
    animation: nvspBalloonRise 15s linear infinite;
    box-shadow: inset -10px -10px 20px rgba(0, 0, 0, 0.1);
}

/* Touwtje onder de ballon */
.nvsp-balloon::before {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 50px;
    background: rgba(0, 0, 0, 0.4);
}

/* Knoop aan het touwtje */
.nvsp-balloon::after {
    content: '';
    position: absolute;
    bottom: -56px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
}

/* SUPER VLOEIENDE ANIMATIE - LINEAR MOVEMENT */
@keyframes nvspBalloonRise {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    2% {
        opacity: 1;
        transform: translateY(0) translateX(0) rotate(0deg) scale(1);
    }
    10% {
        transform: translateY(-10vh) translateX(5px) rotate(2deg) scale(1);
    }
    20% {
        transform: translateY(-20vh) translateX(-3px) rotate(-2deg) scale(1);
    }
    30% {
        transform: translateY(-30vh) translateX(8px) rotate(3deg) scale(1);
    }
    40% {
        transform: translateY(-40vh) translateX(-5px) rotate(-3deg) scale(1);
    }
    50% {
        transform: translateY(-50vh) translateX(10px) rotate(2deg) scale(1);
    }
    60% {
        transform: translateY(-60vh) translateX(-8px) rotate(-2deg) scale(1);
    }
    70% {
        transform: translateY(-70vh) translateX(6px) rotate(3deg) scale(1);
    }
    80% {
        transform: translateY(-80vh) translateX(-4px) rotate(-2deg) scale(1);
    }
    85% {
        transform: translateY(-90vh) translateX(0px) rotate(0deg) scale(1);
        opacity: 1;
    }
    90% {
        transform: translateY(-100vh) translateX(0px) rotate(0deg) scale(1.2);
        opacity: 1;
    }
    92% {
        transform: translateY(-105vh) translateX(0px) rotate(0deg) scale(1.5);
        opacity: 0.8;
    }
    94% {
        transform: translateY(-108vh) translateX(0px) rotate(0deg) scale(0.8);
        opacity: 0.5;
    }
    96% {
        transform: translateY(-110vh) translateX(0px) rotate(0deg) scale(0.3);
        opacity: 0.2;
    }
    98% {
        transform: translateY(-112vh) translateX(0px) rotate(0deg) scale(0.1);
        opacity: 0.05;
    }
    100% {
        transform: translateY(-115vh) translateX(0px) rotate(0deg) scale(0);
        opacity: 0;
    }
}

/* Verschillende balloon kleuren, posities en timings */
.nvsp-balloon:nth-child(2) {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8bb9 100%);
    left: 8%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.nvsp-balloon:nth-child(3) {
    background: linear-gradient(135deg, #feca57 0%, #fee140 100%);
    left: 22%;
    animation-delay: 3s;
    animation-duration: 16s;
}

.nvsp-balloon:nth-child(4) {
    background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
    left: 38%;
    animation-delay: 6s;
    animation-duration: 14s;
}

.nvsp-balloon:nth-child(5) {
    background: linear-gradient(135deg, #1dd1a1 0%, #10ac84 100%);
    left: 58%;
    animation-delay: 2s;
    animation-duration: 17s;
}

.nvsp-balloon:nth-child(6) {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    left: 74%;
    animation-delay: 5s;
    animation-duration: 15.5s;
}

.nvsp-balloon:nth-child(7) {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    left: 90%;
    animation-delay: 8s;
    animation-duration: 16.5s;
}

/* ============================================
   OUDE WELCOME MODAL (Blijft behouden)
   ============================================ */
.sloganhunt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99998;
    display: none;
}

.sloganhunt-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.sloganhunt-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.sloganhunt-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.sloganhunt-modal-close:hover {
    color: #333;
}

.sloganhunt-modal-body {
    padding: 40px 30px;
}

.modal-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

.sloganhunt-modal-body h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.sloganhunt-modal-body p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 25px;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 640px) {
    .nvsp-overlay-content {
        width: 95%;
        border-radius: 15px;
    }

    .nvsp-overlay-logo-section {
        padding: 30px 20px 20px;
        border-radius: 15px 15px 0 0;
    }

    .nvsp-overlay-body {
        padding: 25px 25px;
    }

    .nvsp-overlay-title {
        font-size: 24px;
    }

    .nvsp-overlay-text {
        font-size: 15px;
    }

    .nvsp-btn {
        padding: 14px 25px;
        font-size: 15px;
    }

    .nvsp-balloon {
        width: 35px;
        height: 48px;
    }

    .nvsp-balloon::before {
        height: 35px;
        bottom: -35px;
    }

    .nvsp-balloon::after {
        bottom: -40px;
    }

    .nvsp-overlay-terms {
        font-size: 13px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .nvsp-overlay-modal,
    .nvsp-overlay-content,
    .nvsp-confetti,
    .nvsp-confetti-piece,
    .nvsp-balloon {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus styles voor toetsenbord navigatie */
.nvsp-overlay-close:focus,
.nvsp-btn:focus,
.nvsp-overlay-terms a:focus {
    outline: 2px solid #0033A0;
    outline-offset: 2px;
}

/* ============================================
   FORCE LIGHT MODE - Override dark mode
   ============================================ */
@media (prefers-color-scheme: dark) {
    .nvsp-overlay-modal {
        background: linear-gradient(to bottom right, #ffe4b3, #ffc99e, #ffb088);
    }

    .nvsp-overlay-content {
        background: rgba(255, 255, 255, 0.95);
        color: #333;
    }

    .nvsp-overlay-title {
        color: #0033A0;
    }

    .nvsp-overlay-text {
        color: #444;
    }

    .nvsp-overlay-close {
        color: #666;
    }

    .nvsp-overlay-close:hover {
        color: #333;
        background: rgba(0, 0, 0, 0.2);
    }

    .nvsp-btn-primary {
        background: linear-gradient(135deg, #FF6600 0%, #FF8833 100%);
        color: white !important;
    }

    .nvsp-btn-secondary {
        background: white;
        color: #0033A0 !important;
        border-color: #0033A0;
    }

    .nvsp-overlay-terms a {
        color: #0033A0;
    }
}
