/* =============================================
   Rezervuary — CF7 Form Styles
   Matches the original Tilda design exactly
   ============================================= */

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

/* ---- Popup Box ---- */
.rv-popup-box {
    position: relative;
    background: #fff;
    border-radius: 10px;
    padding: 40px 40px 30px;
    width: 100%;
    max-width: 500px;
    margin: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* ---- Close Button ---- */
.rv-popup-close {
    position: absolute;
    top: 14px; right: 18px;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px; height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.rv-popup-close svg g {
    fill: #2a383e;
}
.rv-popup-close:hover svg g {
    fill: #ee7411;
}

/* ---- Popup Title & Description ---- */
.rv-popup-title {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #2a383e;
    text-align: center;
    margin: 0 0 8px;
    line-height: 1.2;
}
.rv-popup-descr {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #666;
    text-align: center;
    margin: 0 0 24px;
}

/* ---- CF7 form wrapper ---- */
.rv-popup-box .wpcf7,
.rv-popup-box .wpcf7-form {
    margin: 0;
    padding: 0;
}

/* ---- Inputs ---- */
.rv-input,
.wpcf7-form .rv-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    height: 52px;
    padding: 0 16px;
    margin-bottom: 14px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
    color: #000;
    background: #fff;
    border: 1px solid #c9c9c9;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.2s;
}
.rv-input:focus {
    border-color: #ee7411;
}
.rv-input::placeholder {
    color: #aaa;
}

/* ---- Submit Button ---- */
.rv-btn,
.wpcf7-form .rv-btn {
    display: block;
    width: 100%;
    height: 52px;
    margin-top: 6px;
    padding: 0 20px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-image: linear-gradient(0.333turn, rgba(238,116,17,1) 0%, rgba(228,131,53,1) 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.rv-btn::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #2a383e;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.2s ease-in-out;
}
.rv-btn:hover::after {
    opacity: 1;
}

/* ---- CF7 validation errors ---- */
.wpcf7-not-valid-tip {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 12px;
    color: #e74c3c;
    display: block;
    margin-top: -10px;
    margin-bottom: 10px;
}
.wpcf7-form-control-wrap .rv-input.wpcf7-not-valid {
    border-color: #e74c3c;
}

/* ---- CF7 success/response message ---- */
.wpcf7-response-output {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    margin: 12px 0 0;
    padding: 10px 14px;
    border-radius: 5px;
    border: none !important;
    text-align: center;
}
.wpcf7-mail-sent-ok {
    background: #e8f5e9;
    color: #2e7d32;
}
.wpcf7-mail-sent-ng,
.wpcf7-validation-errors,
.wpcf7-spam-blocked {
    background: #fdecea;
    color: #c62828;
}

/* ---- Spinner ---- */
.wpcf7-spinner {
    display: none !important;
}

/* ---- No CF7 fallback message ---- */
.rv-no-cf7 {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 14px;
    color: #888;
    text-align: center;
    padding: 10px 0;
}

/* ---- Remove CF7 default paragraph spacing ---- */
.rv-popup-box .wpcf7 p,
.rv-popup-box .wpcf7-form p {
    margin: 0;
}
.rv-popup-box .wpcf7-form-control-wrap {
    display: block;
}

/* ---- Mobile ---- */
@media screen and (max-width: 560px) {
    .rv-popup-box {
        padding: 30px 20px 24px;
    }
    .rv-popup-title {
        font-size: 20px;
    }
}
