@import url("https://fonts.googleapis.com/css2?family=Alexandria:wght@300;400;500;600;700&display=swap");

#ravielson-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(22, 43, 59, 0.7); /* Dark blue from theme #162b3b with opacity */
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 15px;
    box-sizing: border-box;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    font-family: "Alexandria", sans-serif;
}

#ravielson-popup-overlay.ravielson-popup-hidden {
    opacity: 0;
    visibility: hidden;
}

.ravielson-popup-box {
    background: #ffffff;
    max-width: 700px; /* Increased from 500px */
    width: 100%;
    margin: 0;
    border-radius: 8px; /* Slightly larger radius */
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-top: 5px solid #fdb161;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 100%;
    -webkit-overflow-scrolling: touch;
}

/* Wider box when an image is present */
.ravielson-popup-box.has-image {
    max-width: 1100px; /* Increased from 800px */
}

#ravielson-popup-overlay.ravielson-popup-hidden .ravielson-popup-box {
    transform: translateY(50px);
}

.ravielson-popup-content-wrap {
    display: flex;
    flex-direction: row;
}

.ravielson-popup-content {
    flex: 1;
    padding: 60px 50px; /* Increased padding */
    text-align: center;
}

.ravielson-popup-image {
    flex: 1;
    display: flex;
    align-items: stretch;
    background: #f4f4f4;
}

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

#ravielson-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f4f4f4;
    border: 1px solid #fdb161;
    font-size: 28px;
    line-height: 1;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #162b3b;
    transition: all 0.3s ease;
    z-index: 2;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

#ravielson-popup-close:hover {
    background: #e0e0e0;
    color: #000;
}

.has-image #ravielson-popup-close {
    /* Keeping it exactly the same across layouts now, just semi-transparent if over image */
    background: rgba(255, 255, 255, 0.85);
}
.has-image #ravielson-popup-close:hover {
    background: rgba(255, 255, 255, 1);
}


.ravielson-popup-logo {
    max-height: 80px;
    max-width: 100%;
    margin: 0 auto 40px auto; /* Zwiększony odstęp od dołu */
    display: block;
    object-fit: contain;
}

.ravielson-popup-content h2 {
    font-size: 32px; /* Increased from 22px */
    margin-top: 0;
    margin-bottom: 20px;
    color: #162b3b;
    font-weight: 600;
    line-height: 1.3;
}

.ravielson-popup-content p {
    font-size: 18px; /* Increased from 15px */
    color: #162b3b;
    margin-bottom: 35px;
    line-height: 1.6;
    font-weight: 400;
}

#ravielson-popup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#ravielson-popup-form input[type="text"] {
    width: 100%;
    padding: 16px 20px; /* Increased padding */
    border: 2px solid #d4c5b5;
    border-radius: 4px;
    font-size: 18px; /* Increased from 15px */
    font-family: "Alexandria", sans-serif;
    color: #162b3b;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

#ravielson-popup-form input[type="text"]:focus {
    outline: none;
    border-color: #c19a6b;
}

#ravielson-popup-form button[type="submit"] {
    background: #fdb161;
    color: #303030;
    border: none;
    padding: 18px 25px; /* Increased padding */
    font-size: 18px; /* Increased from 15px */
    font-weight: 600;
    font-family: "Alexandria", sans-serif;
    letter-spacing: 0.5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
    text-transform: uppercase;
}

#ravielson-popup-form button[type="submit"]:hover {
    background: #403836;
    color: #ffffff;
}

#ravielson-popup-response {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
    padding: 15px;
    border-radius: 4px;
}

#ravielson-popup-response.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

#ravielson-popup-response.error {
    background: #fbe9e7;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Media Queries */
@media (max-width: 768px) {
    .ravielson-popup-content-wrap {
        flex-direction: column;
    }
    
    .ravielson-popup-content {
        padding: 40px 25px;
    }

    .ravielson-popup-image {
        /* On mobile, place it under the content */
        order: 2;
        max-height: 300px;
    }

    .ravielson-popup-content h2 {
        font-size: 26px;
    }
    
    .ravielson-popup-content p {
        font-size: 16px;
    }
}
