/* ── Form fields ─────────────────────────────────────────────────────── */

.rwif-form .rwif-input {
    width: 100%;
    color: #2F2F2F;
    padding: 0 0 15px 0;
    border: 0;
    border-bottom: 1px solid #2F2F2F;
    background: transparent;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
    text-transform: uppercase;
}

.rwif-form .rwif-input::placeholder {
    color: #2F2F2F;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    opacity: 1;
}

.rwif-form textarea.rwif-input {
    resize: vertical;
    min-height: 60px;
}

.rwif-form .rwif-label {
    color: #2F2F2F;
    font-size: 12px;
    margin: 0;
    text-transform: uppercase;
}

.rwif-event-types, .rwif-agreement {
    border-bottom: 1px solid #2F2F2F;
}

/* ── Phone group ─────────────────────────────────────────────────────── */

.rwif-phone-group {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #2F2F2F;
}

.rwif-phone-group .rwif-input {
    border-bottom: 0;
}

.rwif-phone-code-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 0;
    padding: 0 0 15px 0;
    color: #2F2F2F;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.rwif-phone-code-btn .rwif-flag {
    width: 28px;
    height: 21px;
    object-fit: cover;
    display: block;
}

.rwif-phone-code-btn .rwif-chevron {
    width: 12px;
    height: 6px;
    object-fit: contain;
    display: block;
}

.rwif-phone-number {
    margin-left: 15px;
    flex: 1;
    min-width: 0;
}

/* ── Checkboxes (event types + I agree) ──────────────────────────────── */


.rwif-event-type {
    margin-bottom: 15px;
}

.rwif-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #2F2F2F;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 12px;
    user-select: none;
}

.rwif-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.rwif-checkbox {
    width: 25px;
    height: 25px;
    border: 1px solid #C87474;
    flex-shrink: 0;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70% 70%;
    box-sizing: border-box;
}

.rwif-checkbox-label input[type="checkbox"]:checked + .rwif-checkbox {
    background-image: var(--rwif-checked-url);
}

.rwif-checkbox-text {
    text-transform: uppercase;
}

/* ── Date field with calendar button ─────────────────────────────────── */

.rwif-date-field {
    position: relative;
}

.rwif-date-field .rwif-input {
    padding-right: 60px;
    cursor: pointer;
    background: transparent;
}

.rwif-cal-btn {
    position: absolute;
    right: 0;
    bottom: 8px;
    width: 48px;
    height: 52px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.rwif-cal-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ── Submit message ──────────────────────────────────────────────────── */

.rwif-message:empty {
    display: none;
}

.rwif-message {
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 12px;
}

.rwif-message p {
    margin: 0 0 6px;
}

.rwif-message.is-error  { color: #C0392B; }
.rwif-message.is-success { color: #2F7F4F; }

/* ── Modal shell ─────────────────────────────────────────────────────── */

.rwif-modal[hidden] {
    display: none !important;
}

.rwif-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rwif-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.rwif-modal-box {
    position: relative;
    background: #fff;
    border: 1px solid #2F2F2F;
    width: 658px;
    height: 549px;
    padding: 30px;
    box-sizing: border-box;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
}

@media screen and (max-width: 767px) {
    .rwif-modal-box {
        width: 744px;
        height: 549px;
        padding: 30px;
    }
}

@media screen and (max-width: 639px) {
    .rwif-modal-box {
        width: 390px;
        height: 549px;
        padding: 15px;
    }
}

/* ── Phone modal: country list ───────────────────────────────────────── */

.rwif-phone-modal .rwif-modal-box .rwif-country-list {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    padding: 15px 15px 0 15px;
    box-sizing: border-box;
    scrollbar-color: #C87474 #D4D4D4;
    scrollbar-width: thin;

    border: 1px solid #2F2F2F;
}

.rwif-country-list::-webkit-scrollbar {
    width: 3px;
}

.rwif-country-list::-webkit-scrollbar-track {
    background: #D4D4D4;
    width: 3px;
}

.rwif-country-list::-webkit-scrollbar-thumb {
    width: 3px;
    background: #C87474;
}

.rwif-country-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-bottom: 10px;
    cursor: pointer;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 22px;
    color: #333;
}

.rwif-country-item-name {
    text-align: left;
}

.rwif-country-item-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.rwif-country-item-right img {
    width: 28px;
    height: 21px;
    object-fit: cover;
    display: block;
}

/* ── Calendar modal ──────────────────────────────────────────────────── */

.rwif-cal-modal .rwif-cal-content {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding-top: 42px;
    padding-bottom: 42px;
    display: flex;
    flex-direction: column;
    gap: 20px;

    border: 1px solid #2F2F2F;
}

@media screen and (max-width: 639px) {
    .rwif-cal-modal .rwif-cal-content {
        /* padding: 30px; */
    }
}

.rwif-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-left: 42px;
    padding-right: 42px;
}

.rwif-cal-prev,
.rwif-cal-next {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.rwif-cal-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rwif-cal-prev img,
.rwif-cal-next img {
    width: 10px;
    height: 10px;
    object-fit: contain;
    display: block;
}

.rwif-cal-title {
    font-size: 24px;
    color: #2F2F2F;
    text-transform: uppercase;
}

.rwif-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    color: #2F2F2F;

    text-transform: uppercase;
    font-size: 20px;

    margin-top: 56px;

    padding-left: 22px;
    padding-right: 22px;
}

.rwif-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    justify-items: center;
    align-items: center;
    row-gap: 4px;

    padding-left: 22px;
    padding-right: 22px;
}

.rwif-cal-day {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #2F2F2F;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 12px;
    box-sizing: border-box;
    user-select: none;
}

.rwif-cal-day.is-empty {
    cursor: default;
}

.rwif-cal-day.is-disabled {
    color: #C9C9C9;
    cursor: not-allowed;
}

.rwif-cal-day-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.rwif-cal-day.is-selected {
    background: #C87474;
    border-radius: 50%;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.55);
}

.rwif-cal-day.is-selected .rwif-cal-day-num {
    width: 30px;
    height: 30px;
    border: 1px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    box-sizing: border-box;

    box-shadow: 4px 4px 4px 0px #00000040;

}

@media screen and (max-width: 639px) {
    .rwif-cal-day {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}
