/* GG Popups Frontend Styles */
:root {
    --popup-bg: #ffffff;
    --popup-text: #1e293b;
    --popup-btn: #dc2626;
    --popup-btn-text: #ffffff;
    --popup-width: 480px;
    --popup-radius: 12px;
}

/* Overlay */
.gg-popup-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999998;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gg-popup-visible .gg-popup-overlay { opacity: 1; }

/* Base popup */
.gg-popup { position: fixed; z-index: 999999; }
.gg-popup .gg-popup-inner {
    background: var(--popup-bg);
    background-image: var(--popup-bg-image, none);
    background-size: cover;
    background-position: center;
    color: var(--popup-text);
    border-radius: var(--popup-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: var(--popup-width);
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.gg-popup-visible .gg-popup-inner { opacity: 1; transform: scale(1) translateY(0); }
.gg-popup-hiding .gg-popup-inner { opacity: 0; transform: scale(0.9) translateY(20px); }

/* Modal (centered) */
.gg-popup-type-modal.gg-popup-pos-center {
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
}

/* Slide-in */
.gg-popup-type-slide_in { bottom: 20px; }
.gg-popup-type-slide_in.gg-popup-pos-bottom-right { right: 20px; }
.gg-popup-type-slide_in.gg-popup-pos-bottom-left { left: 20px; }
.gg-popup-type-slide_in .gg-popup-inner {
    transform: translateX(100%);
    max-width: 380px;
}
.gg-popup-type-slide_in.gg-popup-visible .gg-popup-inner { transform: translateX(0); }
.gg-popup-type-slide_in.gg-popup-pos-bottom-left .gg-popup-inner { transform: translateX(-100%); }
.gg-popup-type-slide_in.gg-popup-pos-bottom-left.gg-popup-visible .gg-popup-inner { transform: translateX(0); }

/* Bar (top/bottom) */
.gg-popup-type-bar { left: 0; right: 0; }
.gg-popup-type-bar.gg-popup-pos-top { top: 0; }
.gg-popup-type-bar.gg-popup-pos-bottom { bottom: 0; }
.gg-popup-type-bar .gg-popup-inner {
    max-width: 100%; width: 100%;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transform: translateY(-100%);
}
.gg-popup-type-bar.gg-popup-pos-bottom .gg-popup-inner { transform: translateY(100%); }
.gg-popup-type-bar.gg-popup-visible .gg-popup-inner { transform: translateY(0); }

/* Fullscreen */
.gg-popup-type-fullscreen { top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; }
.gg-popup-type-fullscreen .gg-popup-inner { max-width: 600px; }

/* Close button */
.gg-popup-close {
    position: absolute; top: 10px; right: 10px;
    background: none; border: none;
    font-size: 24px; line-height: 1;
    color: #94a3b8; cursor: pointer;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    z-index: 10;
}
.gg-popup-close:hover { background: #f1f5f9; color: #1e293b; }

/* Content */
.gg-popup-content { padding: 32px; }
.gg-popup-content h2, .gg-popup-content h3 { margin-top: 0; }
.gg-popup-content img { max-width: 100%; height: auto; border-radius: 8px; }

/* Form styles */
.gg-popup-content form { margin-top: 16px; }
.gg-popup-content input[type="text"],
.gg-popup-content input[type="email"],
.gg-popup-content input[type="tel"],
.gg-popup-content textarea,
.gg-popup-content select {
    width: 100%; padding: 10px 14px;
    border: 1px solid #e2e8f0; border-radius: 6px;
    font-size: 14px; margin-bottom: 12px;
    transition: border-color 0.2s;
}
.gg-popup-content input:focus,
.gg-popup-content textarea:focus,
.gg-popup-content select:focus { border-color: var(--popup-btn); outline: none; }

.gg-popup-content button[type="submit"],
.gg-popup-content .gg-popup-btn {
    width: 100%; padding: 12px 20px;
    background: var(--popup-btn); color: var(--popup-btn-text);
    border: none; border-radius: 6px;
    font-size: 16px; font-weight: 600;
    cursor: pointer; transition: opacity 0.2s;
}
.gg-popup-content button[type="submit"]:hover { opacity: 0.9; }

/* Success message */
.gg-popup-success {
    padding: 32px; text-align: center;
}
.gg-popup-success h3 { color: #16a34a; }

/* Animations */
.gg-popup-anim-slideUp .gg-popup-inner { transform: translateY(50px); }
.gg-popup-anim-slideUp.gg-popup-visible .gg-popup-inner { transform: translateY(0); }
.gg-popup-anim-slideDown .gg-popup-inner { transform: translateY(-50px); }
.gg-popup-anim-slideDown.gg-popup-visible .gg-popup-inner { transform: translateY(0); }
.gg-popup-anim-zoomIn .gg-popup-inner { transform: scale(0.5); }
.gg-popup-anim-zoomIn.gg-popup-visible .gg-popup-inner { transform: scale(1); }

/* Mobile */
@media (max-width: 768px) {
    .gg-popup-type-modal .gg-popup-inner,
    .gg-popup-type-fullscreen .gg-popup-inner { width: 95vw; max-height: 85vh; }
    .gg-popup-content { padding: 24px; }
    .gg-popup-type-slide_in { bottom: 0; right: 0; left: 0; }
    .gg-popup-type-slide_in .gg-popup-inner { max-width: 100%; border-radius: 12px 12px 0 0; }
}
