/**
 * Popupy Public CSS
 *
 * Siteye eklenen popuplar için stil tanımlamaları
 */

/* Popup Overlay */
.popupy-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popupy-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Popup Modal */
.popupy-modal {
    width: 90%;
    max-width: 800px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.popupy-overlay.show .popupy-modal {
    transform: scale(1);
    opacity: 1;
}

/* Kapatma Butonu */
.popupy-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    z-index: 10;
}

.popupy-close:hover {
    color: #333;
}

/* Popup İçerik Alanı */
.popupy-content {
    display: flex;
    flex-direction: row;
}

/* Popup Görsel Alanı */
.popupy-image {
    flex: 1;
    max-width: 50%;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background-color: #f5f5f5;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.popupy-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Görsel yükleniyor animasyonu */
.popupy-image::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e67e22;
    border-radius: 50%;
    animation: popupy-spin 1s linear infinite;
}

.popupy-image:has(img[src])::before {
    display: none;
}

@keyframes popupy-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Popup Metin Alanı */
.popupy-text {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.popupy-text h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 28px;
    line-height: 1.2;
    text-align: center;
}

.popupy-body {
    margin-bottom: 25px;
    line-height: 1.6;
    text-align: center;
}

.popupy-buttons {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Butonlar */
.popupy-primary-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #e67e22;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    transition: opacity 0.2s ease;
    min-width: 180px;
}

.popupy-primary-button:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
}

/* İkinci butonları tamamen kaldır - global kural */
.popupy-secondary-button,
button.popupy-secondary-button,
a.popupy-secondary-button,
[class*="secondary-button"],
[class*="no-thanks"],
[id*="no-thanks"],
[class*="nothanks"],
[id*="nothanks"],
.popupy-buttons > *:not(.popupy-primary-button) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    pointer-events: none !important;
}

/* Duyarlı Tasarım */
@media screen and (max-width: 768px) {
    .popupy-modal {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .popupy-content {
        flex-direction: column;
    }
    
    .popupy-image {
        max-width: 100%;
        min-height: 250px;
        /*max-height: 350px;*/
        padding-bottom: 20px;
        overflow: hidden;
    }
    
    .popupy-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .popupy-text {
        padding: 30px;
        text-align: center;
    }
    
    .popupy-text h2 {
        font-size: 24px;
        text-align: center;
    }
    
    .popupy-primary-button {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
}

.popupy-text-inner {
    max-width: 500px;
    margin: 0 auto;
}

/* Metin içeriği gizli olduğunda sadece görsel ve buton için stil */
.popupy-content:has(.popupy-text-inner:not(:has(h2))) .popupy-image {
    max-width: 100%;
}

.popupy-content:has(.popupy-text-inner:not(:has(h2))) {
    flex-direction: column;
    align-items: center;
}

/* Alternatif: Metin olmadığında butonu ortalamak için */
.popupy-text-inner:not(:has(h2)) .popupy-buttons {
    margin-top: 0;
}

/* Tablet için responsive */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    .popupy-modal {
        max-width: 700px;
    }
    
    .popupy-image {
        min-height: 350px;
    }
}

/* Geniş ekranlar için */
@media screen and (min-width: 1025px) {
    .popupy-modal {
        max-width: 900px;
    }
    
    .popupy-image {
        min-height: 450px;
    }
}

/* Ritzz App Teması - Özel popup stili */
.ritzz-app-popup .popupy-modal {
    display: flex;
    flex-direction: row;
    max-width: 900px;
    overflow: hidden;
    border-radius: 12px;
}

.ritzz-app-popup .popupy-content {
    display: flex;
    flex-direction: row;
    width: 100%;
}

.ritzz-app-popup .popupy-text {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ritzz-app-popup .popupy-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
}

.ritzz-app-popup .popupy-primary-button {
    background-color: #e67e22;
    color: white;
    font-weight: bold;
    padding: 12px 30px;
    border-radius: 4px;
    min-width: 200px;
    margin: 15px 0;
}

