/**
 * FNP Popup System CSS - Modern & Clean Design
 */

/* Reset & Base */
.fnp-popup-overlay * {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Overlay */
.fnp-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999999 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.fnp-popup-overlay.fnp-popup-show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Container */
.fnp-popup-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fnp-popup-show .fnp-popup-container {
    transform: scale(1) translateY(0);
}

/* Content */
.fnp-popup-content {
    position: relative;
}

.fnp-popup-body {
    padding: 30px 35px 35px;
}

/* Close Button */
.fnp-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.08);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 300;
    color: #555;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
    line-height: 1;
}

.fnp-popup-close:hover {
    background: rgba(0, 0, 0, 0.15);
    color: #222;
    transform: rotate(90deg);
}

/* Image */
.fnp-popup-image {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.fnp-popup-image img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    display: block;
}

/* Title */
.fnp-popup-title {
    margin: 0 0 15px 0;
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    text-align: center;
}

/* Text */
.fnp-popup-text {
    margin: 0 0 25px 0;
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    text-align: center;
}

.fnp-popup-text p {
    margin: 0 0 12px 0;
}

.fnp-popup-text p:last-child {
    margin-bottom: 0;
}

.fnp-popup-text h1, .fnp-popup-text h2, .fnp-popup-text h3,
.fnp-popup-text h4, .fnp-popup-text h5, .fnp-popup-text h6 {
    color: #1a1a2e;
    margin: 0 0 15px 0;
}

/* Button */
.fnp-popup-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff8b00 0%, #ff6b00 100%);
    color: #fff !important;
    border: none;
    padding: 14px 35px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none !important;
    text-align: center;
    box-shadow: 0 8px 25px rgba(255, 139, 0, 0.35);
    margin: 0 auto;
    width: auto;
}

.fnp-popup-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 139, 0, 0.45);
    background: linear-gradient(135deg, #ff9500 0%, #ff7500 100%);
}

.fnp-popup-button:active {
    transform: translateY(-1px);
}

/* ==================== SIZE VARIATIONS ==================== */

.fnp-popup-size-small .fnp-popup-container,
.fnp-popup-container.fnp-popup-size-small {
    width: 380px;
}

.fnp-popup-size-medium .fnp-popup-container,
.fnp-popup-container.fnp-popup-size-medium {
    width: 520px;
}

.fnp-popup-size-large .fnp-popup-container,
.fnp-popup-container.fnp-popup-size-large {
    width: 680px;
}

.fnp-popup-size-xl .fnp-popup-container,
.fnp-popup-container.fnp-popup-size-xl {
    width: 900px;
}

/* ==================== TYPE VARIATIONS ==================== */

/* Modal (Default) - Centered */
.fnp-popup-type-modal {
    border-radius: 16px;
}

/* Banner - Top Bar */
.fnp-popup-type-banner {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    transform: translateY(-100%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.fnp-popup-show .fnp-popup-type-banner {
    transform: translateY(0);
}

.fnp-popup-type-banner .fnp-popup-content {
    padding: 0;
}

.fnp-popup-type-banner .fnp-popup-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 18px 30px;
    flex-wrap: wrap;
}

.fnp-popup-type-banner .fnp-popup-title {
    margin: 0;
    font-size: 16px;
}

.fnp-popup-type-banner .fnp-popup-text {
    margin: 0;
    font-size: 14px;
}

.fnp-popup-type-banner .fnp-popup-button {
    padding: 10px 25px;
    font-size: 14px;
    margin: 0;
}

.fnp-popup-type-banner .fnp-popup-close {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    font-size: 18px;
}

.fnp-popup-type-banner .fnp-popup-close:hover {
    transform: translateY(-50%) rotate(90deg);
}

/* Corner - Bottom Right */
.fnp-popup-type-corner {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    top: auto !important;
    left: auto !important;
    width: 360px !important;
    max-width: calc(100vw - 50px);
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
    transform: translateX(120%) scale(0.9);
}

.fnp-popup-show .fnp-popup-type-corner {
    transform: translateX(0) scale(1);
}

.fnp-popup-type-corner .fnp-popup-body {
    padding: 25px;
}

.fnp-popup-type-corner .fnp-popup-title {
    font-size: 20px;
    text-align: left;
    margin-bottom: 10px;
}

.fnp-popup-type-corner .fnp-popup-text {
    font-size: 14px;
    text-align: left;
    margin-bottom: 20px;
}

.fnp-popup-type-corner .fnp-popup-button {
    width: 100%;
    display: block;
}

.fnp-popup-type-corner .fnp-popup-image img {
    max-height: 180px;
    border-radius: 16px 16px 0 0;
}

/* Fullscreen */
.fnp-popup-type-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
}

.fnp-popup-type-fullscreen .fnp-popup-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.fnp-popup-type-fullscreen .fnp-popup-image {
    flex: 0 0 auto;
    max-height: 40vh;
}

.fnp-popup-type-fullscreen .fnp-popup-image img {
    max-height: 40vh;
    width: 100%;
}

.fnp-popup-type-fullscreen .fnp-popup-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.fnp-popup-type-fullscreen .fnp-popup-title {
    font-size: 38px;
    margin-bottom: 20px;
}

.fnp-popup-type-fullscreen .fnp-popup-text {
    font-size: 18px;
    margin-bottom: 35px;
}

.fnp-popup-type-fullscreen .fnp-popup-button {
    padding: 18px 50px;
    font-size: 17px;
}

/* Slide - Bottom Sheet */
.fnp-popup-type-slide {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 85vh;
    border-radius: 24px 24px 0 0 !important;
    transform: translateY(100%);
}

.fnp-popup-show .fnp-popup-type-slide {
    transform: translateY(0);
}

.fnp-popup-type-slide::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
}

.fnp-popup-type-slide .fnp-popup-body {
    padding: 35px 30px 40px;
}

/* Notification - Top Right */
.fnp-popup-type-notification {
    position: fixed !important;
    top: 25px !important;
    right: 25px !important;
    bottom: auto !important;
    left: auto !important;
    width: 340px !important;
    max-width: calc(100vw - 50px);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
}

.fnp-popup-show .fnp-popup-type-notification {
    transform: translateX(0);
}

.fnp-popup-type-notification .fnp-popup-body {
    padding: 20px;
}

.fnp-popup-type-notification .fnp-popup-title {
    font-size: 16px;
    text-align: left;
    margin-bottom: 8px;
}

.fnp-popup-type-notification .fnp-popup-text {
    font-size: 14px;
    text-align: left;
    margin-bottom: 15px;
}

.fnp-popup-type-notification .fnp-popup-button {
    padding: 10px 20px;
    font-size: 13px;
}

/* ==================== ANIMATIONS ==================== */

@keyframes fnpBounce {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fnpShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

@keyframes fnpFlip {
    0% { transform: perspective(400px) rotateY(90deg); opacity: 0; }
    40% { transform: perspective(400px) rotateY(-10deg); }
    70% { transform: perspective(400px) rotateY(10deg); }
    100% { transform: perspective(400px) rotateY(0); opacity: 1; }
}

.fnp-popup-animation-bounce.fnp-popup-show .fnp-popup-container {
    animation: fnpBounce 0.6s ease forwards;
}

.fnp-popup-animation-shake.fnp-popup-show .fnp-popup-container {
    animation: fnpShake 0.5s ease;
}

.fnp-popup-animation-flip.fnp-popup-show .fnp-popup-container {
    animation: fnpFlip 0.5s ease forwards;
}

/* ==================== RESPONSIVE ==================== */

@media screen and (max-width: 768px) {
    .fnp-popup-overlay {
        padding: 15px;
    }
    
    .fnp-popup-container {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .fnp-popup-body {
        padding: 25px 20px 30px;
    }
    
    .fnp-popup-title {
        font-size: 22px;
    }
    
    .fnp-popup-text {
        font-size: 14px;
    }
    
    .fnp-popup-button {
        width: 100%;
        display: block;
        padding: 14px 25px;
    }
    
    .fnp-popup-image img {
        max-height: 200px;
    }
    
    /* Corner on mobile */
    .fnp-popup-type-corner {
        bottom: 15px !important;
        right: 15px !important;
        left: 15px !important;
        width: auto !important;
        max-width: none;
    }
    
    /* Notification on mobile */
    .fnp-popup-type-notification {
        top: 15px !important;
        right: 15px !important;
        left: 15px !important;
        width: auto !important;
    }
    
    /* Banner on mobile */
    .fnp-popup-type-banner .fnp-popup-body {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .fnp-popup-type-banner .fnp-popup-title,
    .fnp-popup-type-banner .fnp-popup-text {
        text-align: center;
    }
    
    .fnp-popup-type-banner .fnp-popup-button {
        width: 100%;
    }
    
    /* Fullscreen on mobile */
    .fnp-popup-type-fullscreen .fnp-popup-body {
        padding: 30px 20px;
    }
    
    .fnp-popup-type-fullscreen .fnp-popup-title {
        font-size: 26px;
    }
    
    .fnp-popup-type-fullscreen .fnp-popup-text {
        font-size: 15px;
    }
}

@media screen and (max-width: 480px) {
    .fnp-popup-title {
        font-size: 20px;
    }
    
    .fnp-popup-close {
        width: 32px;
        height: 32px;
        font-size: 20px;
        top: 12px;
        right: 12px;
    }
    
    .fnp-popup-type-fullscreen .fnp-popup-title {
        font-size: 22px;
    }
}

/* ==================== THEME COLORS ==================== */

/* Orange Theme (Default) */
.fnp-popup-theme-orange .fnp-popup-button {
    background: linear-gradient(135deg, #ff8b00 0%, #ff6b00 100%);
    box-shadow: 0 8px 25px rgba(255, 139, 0, 0.35);
}

/* Blue Theme */
.fnp-popup-theme-blue .fnp-popup-button {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.35);
}

/* Green Theme */
.fnp-popup-theme-green .fnp-popup-button {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 8px 25px rgba(17, 153, 142, 0.35);
}

/* Purple Theme */
.fnp-popup-theme-purple .fnp-popup-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
}

/* Red Theme */
.fnp-popup-theme-red .fnp-popup-button {
    background: linear-gradient(135deg, #f85032 0%, #e73827 100%);
    box-shadow: 0 8px 25px rgba(248, 80, 50, 0.35);
}

/* Dark Theme */
.fnp-popup-theme-dark .fnp-popup-container {
    background: #1a1a2e;
    color: #fff;
}

.fnp-popup-theme-dark .fnp-popup-title {
    color: #fff;
}

.fnp-popup-theme-dark .fnp-popup-text {
    color: #aaa;
}

.fnp-popup-theme-dark .fnp-popup-close {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.fnp-popup-theme-dark .fnp-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== UTILITY ==================== */

.fnp-popup-text-left { text-align: left !important; }
.fnp-popup-text-center { text-align: center !important; }
.fnp-popup-text-right { text-align: right !important; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fnp-popup-overlay,
    .fnp-popup-container,
    .fnp-popup-close,
    .fnp-popup-button {
        transition: none !important;
        animation: none !important;
    }
}
