/* Ulovo Booking Frontend Widget */

.ulovo-booking-widget {
    max-width: 680px;
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,.1);
    font-family: inherit;
}
.ulovo-widget-title {
    margin: 0 0 24px;
    font-size: 1.5rem;
    color: #1a1a2e;
}

/* Notice */
.ulovo-widget-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: .93rem;
}
.ulovo-widget-notice.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.ulovo-widget-notice.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Form fields */
.ulovo-front-form .ulovo-field {
    margin-bottom: 18px;
}
.ulovo-front-form .ulovo-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: .93rem;
    color: #444;
}
.ulovo-front-form .ulovo-field .required {
    color: #e74c3c;
}
.ulovo-front-form input,
.ulovo-front-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    color: #333;
    transition: border-color .2s;
    background: #fafafa;
}
.ulovo-front-form input:focus,
.ulovo-front-form select:focus {
    border-color: #1a73e8;
    outline: none;
    background: #fff;
}
.ulovo-front-form input[type="number"] {
    max-width: 120px;
}

/* Two-column row */
.ulovo-field-row {
    display: flex;
    gap: 16px;
}
.ulovo-field-row .ulovo-field {
    flex: 1;
}

/* Price box */
.ulovo-price-box {
    background: #e8f4fd;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: .95rem;
    color: #1a73e8;
    font-weight: 600;
}

/* Availability notice */
.ulovo-avail-notice {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: .9rem;
}
.ulovo-avail-notice.avail-ok  { background: #d4edda; color: #155724; }
.ulovo-avail-notice.avail-no  { background: #f8d7da; color: #721c24; }

/* Submit button */
.ulovo-submit-btn {
    width: 100%;
    padding: 14px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
}
.ulovo-submit-btn:hover  { background: #1558b0; }
.ulovo-submit-btn:active { transform: scale(.99); }
.ulovo-submit-btn:disabled { background: #aaa; cursor: not-allowed; }

.ulovo-hold-hint {
    margin-top: 10px;
    text-align: center;
    font-size: .82rem;
    color: #888;
}

/* Timer box */
.ulovo-timer-box {
    text-align: center;
    padding: 28px 20px;
}
.ulovo-timer-label {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #555;
}
.ulovo-countdown {
    font-size: 3rem;
    font-weight: 800;
    color: #e74c3c;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-variant-numeric: tabular-nums;
}
.ulovo-countdown.urgent {
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .5; }
}
.ulovo-pay-btn {
    display: inline-block;
    padding: 14px 36px;
    background: #34a853;
    color: #fff !important;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    transition: background .2s;
}
.ulovo-pay-btn:hover { background: #2d8e46; }

/* Modal Overlay */
.ulovo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.ulovo-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 10px 60px rgba(0,0,0,.3);
    position: relative;
    animation: slideIn .3s ease-out;
}
@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.ulovo-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
}
.ulovo-modal-close:hover { color: #333; }
.ulovo-modal-content h2 {
    margin-bottom: 24px;
    font-size: 1.4rem;
    color: #1a1a2e;
    padding-right: 28px;
}

/* Modal Form */
.ulovo-form-modal {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.ulovo-form-group {
    display: flex;
    flex-direction: column;
}
.ulovo-form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: .93rem;
    color: #444;
}
.ulovo-form-group label .required {
    color: #e74c3c;
}
.ulovo-form-group input {
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    color: #333;
    transition: border-color .2s;
    background: #fafafa;
}
.ulovo-form-group input:focus {
    border-color: #1a73e8;
    outline: none;
    background: #fff;
}

/* Modal notice */
.ulovo-notice {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: .93rem;
    border-left: 4px solid;
}
.ulovo-notice.success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}
.ulovo-notice.error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Submit button in modal */
.ulovo-btn-submit {
    padding: 12px 20px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.ulovo-btn-submit:hover { background: #1558b0; }
.ulovo-btn-submit:disabled { background: #aaa; cursor: not-allowed; }

.ulovo-hint {
    text-align: center;
    font-size: .82rem;
    color: #888;
    margin: 10px 0 0;
}

/* Sector display (when preselected) */
.ulovo-sector-display label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #666;
}
.ulovo-sector-name {
    padding: 12px 14px;
    background: #e8f4fd;
    border: 1px solid #1a73e8;
    border-radius: 6px;
    color: #1a73e8;
    font-weight: 600;
    margin: 0;
}

/* Flatpickr — занятые даты (серые) */
.flatpickr-day.ulovo-day-booked,
.flatpickr-day.flatpickr-disabled.ulovo-day-booked {
    background: #f0f0f0 !important;
    color: #bbb !important;
    text-decoration: line-through;
    cursor: not-allowed !important;
    border-radius: 4px;
}
.flatpickr-day.flatpickr-disabled {
    background: #f7f7f7 !important;
    color: #ccc !important;
    cursor: not-allowed !important;
}
/* Поля дат — единый стиль с остальными полями формы */
#modal-date-start,
#modal-date-end {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E") no-repeat right 10px center;
    cursor: pointer;
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 600px) {
    .ulovo-booking-widget { padding: 20px 16px; }
    .ulovo-field-row { flex-direction: column; gap: 0; }
    .ulovo-modal-content { padding: 24px 20px; }
}
