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

#rmp-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(22, 43, 59, 0.7);
    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;
}

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

.rmp-box {
    background: #ffffff;
    max-width: 700px;
    width: 100%;
    margin: 0;
    border-radius: 8px;
    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;
}

.rmp-box.has-image {
    max-width: 1100px;
}

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

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

.rmp-content {
    flex: 1;
    padding: 50px;
    text-align: left;
}

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

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

.rmp-logo {
    max-height: 80px;
    max-width: 100%;
    margin: 0 auto 30px auto;
    display: block;
    object-fit: contain;
}

#rmp-close {
    position: absolute;
    top: 15px;
    right: 15px;
    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;
}
#rmp-close:hover {
    background: #e0e0e0;
    color: #000;
}
.has-image #rmp-close {
    background: rgba(255, 255, 255, 0.85);
}
.has-image #rmp-close:hover {
    background: rgba(255, 255, 255, 1);
}

.rmp-content h2 {
    font-size: 32px;
    margin-top: 0;
    margin-bottom: 15px;
    color: #162b3b;
    font-weight: 600;
    text-align: center;
}

.rmp-content p {
    font-size: 16px;
    color: #162b3b;
    margin-bottom: 25px;
    text-align: center;
}

#rmp-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rmp-row {
    display: flex;
    gap: 15px;
}
.rmp-row > * {
    flex: 1;
}

#rmp-form input[type="text"],
#rmp-form input[type="email"],
#rmp-form input[type="tel"],
#rmp-form textarea,
#rmp-form select.rmp-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #d4c5b5;
    border-radius: 4px;
    font-size: 16px;
    font-family: "Alexandria", sans-serif;
    color: #162b3b;
    box-sizing: border-box;
    transition: border-color 0.3s;
    background-color: #fff;
}
#rmp-form select.rmp-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23162b3b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px;
}
#rmp-form select.rmp-select:invalid {
    color: #757575;
}
#rmp-form textarea {
    resize: vertical;
}

#rmp-form input:focus,
#rmp-form textarea:focus,
#rmp-form select.rmp-select:focus {
    outline: none;
    border-color: #c19a6b;
}

.rmp-consents {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.rmp-consents label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}
.rmp-consents input[type="checkbox"] {
    margin-top: 2px;
}

#rmp-form button[type="submit"] {
    background: #fdb161;
    color: #303030;
    border: none;
    padding: 16px 25px;
    font-size: 16px;
    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;
    width: 100%;
}
#rmp-form button[type="submit"]:hover {
    background: #403836;
    color: #ffffff;
}

#rmp-response {
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    padding: 12px;
    border-radius: 4px;
    text-align: center;
}
#rmp-response.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}
#rmp-response.error {
    background: #fbe9e7;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

@media (max-width: 768px) {
    .rmp-content-wrap {
        flex-direction: column;
    }
    .rmp-content {
        padding: 30px 20px;
    }
    .rmp-image {
        order: 2;
        max-height: 250px;
    }
    .rmp-row {
        flex-direction: column;
        gap: 15px;
    }
    .rmp-content h2 {
        font-size: 24px;
    }
}
