/**
 * Public Styles (v2.0 - Gutenberg Native)
 */

/* Popup Overlay */
.wpb-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
}

.wpb-popup-overlay.wpb-active {
    display: flex;
}

/* Popup Container */
.wpb-popup {
    position: relative;
    max-width: 600px; /* v2.0: Küçültüldü, ayarlanabilir */
    width: 90%;
    max-height: 600px; /* v2.0: Daha küçük default */
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: wpbPopupFadeIn 0.3s ease;
}

@keyframes wpbPopupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.wpb-popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

/* Popup Content - Gutenberg içeriğine alan */
.wpb-popup-content {
    padding: 40px 30px;
}

/* Gutenberg blokları için genel stiller */
.wpb-popup-content .wp-block,
.wpb-embed .wp-block {
    max-width: 100%;
}

.wpb-popup-content p,
.wpb-embed p {
    margin-bottom: 1em;
}

.wpb-popup-content h1,
.wpb-popup-content h2,
.wpb-popup-content h3,
.wpb-popup-content h4,
.wpb-popup-content h5,
.wpb-popup-content h6,
.wpb-embed h1,
.wpb-embed h2,
.wpb-embed h3,
.wpb-embed h4,
.wpb-embed h5,
.wpb-embed h6 {
    margin-top: 0;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

/* Gutenberg button blokları */
.wpb-popup-content .wp-block-button,
.wpb-embed .wp-block-button {
    margin: 1em 0;
}

.wpb-popup-content .wp-block-button__link,
.wpb-embed .wp-block-button__link {
    text-decoration: none;
    display: inline-block;
}

/* Gutenberg columns */
.wpb-popup-content .wp-block-columns,
.wpb-embed .wp-block-columns {
    margin-bottom: 1.5em;
}

/* Gutenberg images */
.wpb-popup-content .wp-block-image,
.wpb-embed .wp-block-image {
    margin: 1em 0;
}

.wpb-popup-content .wp-block-image img,
.wpb-embed .wp-block-image img {
    max-width: 100%;
    height: auto;
}

/* Timer */
.wpb-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wpb-timer-item {
    text-align: center;
    min-width: 70px;
}

.wpb-timer-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
    color: #333;
}

.wpb-timer-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
}

/* Coupon Section */
.wpb-coupon-section {
    background: #f7f7f7;
    padding: 20px;
    border-radius: 6px;
    margin: 20px 0;
    text-align: center;
}

.wpb-coupon-label {
    font-size: 14px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 10px;
    color: #666;
}

.wpb-coupon-code {
    display: inline-block;
    font-size: 24px;
    font-weight: 700;
    padding: 12px 24px;
    background: #fff;
    border: 2px dashed #0073aa;
    border-radius: 4px;
    margin: 10px 0;
    letter-spacing: 2px;
    color: #0073aa;
}

.wpb-coupon-description {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.wpb-coupon-copy-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}

.wpb-coupon-copy-btn:hover {
    background: #005a87;
}

.wpb-coupon-copy-btn.wpb-copied {
    background: #46b450;
}

/* Embed Campaign */
.wpb-embed {
    margin: 30px auto;
    padding: 30px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .wpb-popup {
        width: 95%;
        max-height: 85vh;
    }

    .wpb-popup-content {
        padding: 30px 20px;
    }

    .wpb-coupon-code {
        font-size: 18px;
        padding: 10px 16px;
    }

    .wpb-timer {
        gap: 10px;
        padding: 15px;
    }

    .wpb-timer-item {
        min-width: 60px;
    }

    .wpb-timer-value {
        font-size: 24px;
    }

    .wpb-embed {
        padding: 20px;
    }

    /* Gutenberg columns responsive */
    .wpb-popup-content .wp-block-columns,
    .wpb-embed .wp-block-columns {
        flex-direction: column;
    }
}

/* Gutenberg Group block spacing */
.wpb-popup-content .wp-block-group,
.wpb-embed .wp-block-group {
    margin-bottom: 1.5em;
}

/* Gutenberg Spacer block */
.wpb-popup-content .wp-block-spacer,
.wpb-embed .wp-block-spacer {
    clear: both;
}

/* Gutenberg Cover block */
.wpb-popup-content .wp-block-cover,
.wpb-embed .wp-block-cover {
    margin-bottom: 1.5em;
    border-radius: 4px;
    overflow: hidden;
}

/* Gutenberg List blocks */
.wpb-popup-content ul,
.wpb-popup-content ol,
.wpb-embed ul,
.wpb-embed ol {
    margin: 1em 0;
    padding-left: 2em;
}

/* Gutenberg Quote blocks */
.wpb-popup-content .wp-block-quote,
.wpb-embed .wp-block-quote {
    margin: 1.5em 0;
    padding-left: 1em;
    border-left: 4px solid #0073aa;
}

/* Gutenberg v2.0: Color Support */
.has-black-color { color: #000000 !important; }
.has-white-color { color: #ffffff !important; }
.has-blue-color { color: #0073aa !important; }
.has-red-color { color: #dc3232 !important; }
.has-green-color { color: #46b450 !important; }
.has-orange-color { color: #f56e28 !important; }
.has-yellow-color { color: #ffb900 !important; }
.has-purple-color { color: #826eb4 !important; }
.has-light-gray-color { color: #f1f1f1 !important; }
.has-gray-color { color: #8c8f94 !important; }

.has-black-background-color { background-color: #000000 !important; }
.has-white-background-color { background-color: #ffffff !important; }
.has-blue-background-color { background-color: #0073aa !important; }
.has-red-background-color { background-color: #dc3232 !important; }
.has-green-background-color { background-color: #46b450 !important; }
.has-orange-background-color { background-color: #f56e28 !important; }
.has-yellow-background-color { background-color: #ffb900 !important; }
.has-purple-background-color { background-color: #826eb4 !important; }
.has-light-gray-background-color { background-color: #f1f1f1 !important; }
.has-gray-background-color { background-color: #8c8f94 !important; }

/* Gutenberg v2.0: Font Size Support */
.has-small-font-size { font-size: 13px !important; }
.has-normal-font-size { font-size: 16px !important; }
.has-medium-font-size { font-size: 20px !important; }
.has-large-font-size { font-size: 24px !important; }
.has-x-large-font-size { font-size: 32px !important; }
.has-huge-font-size { font-size: 42px !important; }

/* Gutenberg v2.0: Text Alignment */
.has-text-align-left { text-align: left !important; }
.has-text-align-center { text-align: center !important; }
.has-text-align-right { text-align: right !important; }

/* Gutenberg v2.0: Custom inline styles support */
.wpb-popup-content [style*="font-size"],
.wpb-popup-content [style*="color"],
.wpb-popup-content [style*="background"],
.wpb-popup-content [style*="padding"],
.wpb-popup-content [style*="margin"],
.wpb-embed [style*="font-size"],
.wpb-embed [style*="color"],
.wpb-embed [style*="background"],
.wpb-embed [style*="padding"],
.wpb-embed [style*="margin"] {
    /* Inline styles from Gutenberg are preserved */
}
