/* Reset */
html,
body {
    margin: 0;
    padding: 0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background: #ffffff;
    color: #384656;
    font-family: Arial, Helvetica, sans-serif;
}

/* Main page */
.site-container {
    width: min(520px, calc(100% - 40px));
    margin: 60px auto;
}

.site-logo {
    margin: 0 0 40px;
}

.site-logo img {
    display: block;
    width: 82px;
    height: auto;
}

.site-title {
    margin: 0 0 28px;
    font-size: 20px;
    line-height: 1.45;
    font-weight: 400;
}

.site-container,
.site-container * {
    max-width: 100%;
}

.confirmation-title {
    margin-bottom: 28px;
}

.form-field {
    margin: 0 0 30px;
}

.form-label {
    display: block;
    margin: 0 0 7px;
    color: #435364;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
}

/* Explicit form controls */
.site-container input[type="tel"],
.site-container select {
    display: block;
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #cfd6dd;
    border-radius: 3px;
    background: #ffffff;
    color: #384656;
    font-family: inherit;
    font-size: 15px;
    line-height: 44px;
    outline: none;
}

.site-container select {
    line-height: normal;
    cursor: pointer;
}

.site-container input[type="tel"]:focus,
.site-container select:focus {
    border-color: #4269a5;
    box-shadow: 0 0 0 2px rgba(66, 105, 165, 0.1);
}

/* Date picker */
.date-picker {
    position: relative;
    width: 100%;
}

.date-trigger {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 1px solid #cfd6dd !important;
    border-radius: 3px !important;
    background: #ffffff !important;
    background-image: none !important;
    color: #7a858f !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 44px !important;
    text-align: left !important;
    cursor: pointer !important;
    outline: none !important;
}

.date-trigger:hover {
    background: #ffffff !important;
}

.date-trigger:focus {
    border-color: #4269a5 !important;
    box-shadow: 0 0 0 2px rgba(66, 105, 165, 0.1) !important;
}

.date-trigger-has-value {
    color: #384656 !important;
}

.date-trigger-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #687583;
}

.date-trigger-icon svg {
    display: block;
}

/* Calendar popup */
.booking-calendar {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 7px);
    left: 0;
    width: 312px;
    max-width: 100%;
    padding: 12px;
    border: 1px solid #d8dee4;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(31, 44, 57, 0.14);
}

.booking-calendar[hidden] {
    display: none !important;
}

.calendar-header {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) 34px !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 0 9px !important;
}

.calendar-month {
    min-width: 0;
    color: #384656;
    font-size: 14px;
    font-weight: 700;
    line-height: 32px;
    text-align: center;
    white-space: nowrap;
}

.calendar-nav {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #e1e5e9 !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    color: #4d5c69 !important;
    box-shadow: none !important;
    font: inherit !important;
    cursor: pointer !important;
}

.calendar-nav:hover:not(:disabled) {
    background: #f5f7f9 !important;
}

.calendar-nav:disabled {
    opacity: 0.35 !important;
    cursor: default !important;
}

.calendar-nav svg {
    display: block;
    width: 18px;
    height: 18px;
}

/* Weekday labels and day grid */
.calendar-weekdays,
.calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    width: 100% !important;
    gap: 3px !important;
}

.calendar-weekdays {
    margin: 0 0 4px !important;
}

.calendar-weekdays span {
    display: block;
    min-width: 0;
    padding: 3px 0;
    color: #7b8792;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

/* IMPORTANT: explicit reset so external/global button rules cannot stretch dates */
.booking-calendar .calendar-day {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 36px !important;
    min-width: 0 !important;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 4px !important;
    background: #ffffff !important;
    color: #384656 !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 36px !important;
    text-align: center !important;
    cursor: pointer !important;
}

.booking-calendar .calendar-day:hover:not(:disabled) {
    background: #edf2f7 !important;
}

.booking-calendar .calendar-day-today {
    outline: 1px solid #4269a5 !important;
    outline-offset: -1px !important;
}

.booking-calendar .calendar-day-selected {
    background: #4269a5 !important;
    color: #ffffff !important;
}

.booking-calendar .calendar-day-disabled {
    background: #f5f6f7 !important;
    color: #c3c9cf !important;
    cursor: default !important;
}

.booking-calendar .calendar-day-empty {
    pointer-events: none !important;
    background: transparent !important;
}

/* Submit */
.primary-button {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: block !important;
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0 15px !important;
    border: 0 !important;
    border-radius: 3px !important;
    background: #4269a5 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 46px !important;
    text-align: center !important;
    cursor: pointer !important;
}

.primary-button:hover {
    background: #35598f !important;
}

.primary-button:active {
    transform: scale(0.995);
}

.form-error {
    margin: -12px 0 20px;
    padding: 10px 12px;
    border: 1px solid #edc6c6;
    border-radius: 3px;
    background: #fff7f7;
    color: #9b2c2c;
    font-size: 13px;
    line-height: 1.4;
}

/* Property photo on confirmation page */
.property-photo {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 0 0 34px;
    padding: 0;
    overflow: hidden;
    border-radius: 7px;
    background: #f2f4f6;
}

.property-photo img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    margin: 0;
    padding: 0;
    border: 0;
    object-fit: cover;
    object-position: center center;
}

/* Mobile */
@media (max-width: 600px) {
    .site-container {
        width: calc(100% - 32px);
        margin: 35px auto;
    }

    .site-logo {
        margin-bottom: 30px;
    }

    .site-logo img {
        width: 72px;
    }

    .site-title {
        margin-bottom: 24px;
        font-size: 18px;
        line-height: 1.4;
    }

    .property-photo {
        width: 100%;
        max-width: 100%;
        margin-bottom: 28px;
        border-radius: 6px;
    }

    .form-field {
        margin-bottom: 26px;
    }

    .site-container input[type="tel"],
    .site-container select,
    .date-trigger {
        height: 46px !important;
        min-height: 46px !important;
        font-size: 16px !important;
        line-height: 46px !important;
    }

    .booking-calendar {
        width: 312px;
        padding: 10px;
    }

    .booking-calendar .calendar-day {
        height: 38px !important;
        min-height: 38px !important;
        line-height: 38px !important;
        font-size: 13px !important;
    }

    .primary-button {
        height: 48px !important;
        min-height: 48px !important;
        line-height: 48px !important;
    }
}


/* Payment confirmation */
.payment-result-page {
    max-width: 560px;
}

.payment-success-card {
    text-align: center;
    padding: 12px 0 20px;
}

.payment-check {
    width: 78px;
    height: 78px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: #e9f7ee;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-check svg {
    width: 42px;
    height: 42px;
    fill: none;
    stroke: #2f9e5b;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.payment-success-title {
    margin: 0 0 28px;
    font-size: 28px;
    line-height: 1.2;
    color: #1f2933;
}

.payment-summary {
    margin: 0 0 28px;
    border-top: 1px solid #e7eaee;
    border-bottom: 1px solid #e7eaee;
}

.payment-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    text-align: left;
}

.payment-summary-row + .payment-summary-row {
    border-top: 1px solid #eef1f4;
}

.payment-summary-row span {
    color: #6b7280;
}

.payment-summary-row strong {
    color: #1f2933;
    text-align: right;
}

.payment-property {
    margin: 0 auto 26px;
    max-width: 500px;
    color: #4b5563;
    line-height: 1.55;
}

.payment-back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.payment-simple-card {
    padding-top: 18px;
}

@media (max-width: 600px) {
    .payment-success-title {
        font-size: 24px;
    }

    .payment-summary-row {
        padding: 13px 0;
    }
}
