/* Popup alap konténer */
.custom-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-popup); /* 9500 - kritikus popup */
    animation: fadeIn 0.4s ease;
    backdrop-filter: blur(8px);
    padding: 20px;
}

/* Popup tartalom konténer */
.popup-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.5s ease;
}

/* Popup címsor és szöveg */
.popup-content h2,
.popup-title {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

.popup-content p,
.popup-text {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Popup gombok konténer */
.popup-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

/* Alap gomb stílusok */
.popup-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 30px;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

/* Értékelés gomb */
.rate-button {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

.rate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

.rate-button::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23FFC107' d='M24 2L30.2 17.3H46.6L33.2 26.9L39.4 42.2L24 32.6L8.6 42.2L14.8 26.9L1.4 17.3H17.8z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* Bezárás gomb */
.close-button {
    background: linear-gradient(135deg, #ea4335, #fbbc05);
    color: white;
    box-shadow: 0 4px 15px rgba(234, 67, 53, 0.3);
}

.close-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 67, 53, 0.4);
}

.close-button::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* X bezáró gomb */
.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    color: #333;
    transform: rotate(90deg);
}

/* Yes/No gombok (Google értékelés popup) */
.yes-button {
    background: #4CAF50;
    color: white;
}

.yes-button:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.no-button {
    background: #f44336;
    color: white;
}

.no-button:hover {
    background: #da190b;
    transform: translateY(-2px);
}

/* Animációk */
@keyframes fadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reszponzív beállítások */
@media (max-width: 768px) {
    .popup-content {
        padding: 30px 20px;
    }

    .popup-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
    }

    .popup-button {
        width: 100%;
        min-width: unset;
        padding: 12px 20px;
        font-size: 1rem;
    }
}

/* Dark mode - mind manuális, mind auto módhoz */
@media (prefers-color-scheme: dark) {
    [data-theme="dark"] .popup-content,
    [data-theme="auto"] .popup-content {
        background: #222;
    }

    [data-theme="dark"] .popup-content h2,
    [data-theme="auto"] .popup-content h2 {
        color: #fff;
    }

    [data-theme="dark"] .popup-content p,
    [data-theme="auto"] .popup-content p {
        color: #ccc;
    }

    [data-theme="dark"] .rate-button,
    [data-theme="auto"] .rate-button {
        background: linear-gradient(135deg, #1a73e8, #34a853);
    }

    [data-theme="dark"] .close-button,
    [data-theme="auto"] .close-button {
        background: linear-gradient(135deg, #c53929, #f4b400);
    }

    [data-theme="dark"] .popup-close,
    [data-theme="auto"] .popup-close {
        color: #666;
    }

    [data-theme="dark"] .popup-close:hover,
    [data-theme="auto"] .popup-close:hover {
        color: #fff;
    }
}

/* Akadálymentes használat */
.popup-button:focus,
.popup-close:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
}