/* Стили для виджета поиска с префиксом pc- */
.pc-search-widget {
    /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; */
    max-width: 1030px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.pc-search-form {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 32px;
    box-sizing: border-box;
}

.pc-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.pc-form-group {
    display: flex;
    flex-direction: column;
}

.pc-form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--theme-color-main, #374151);
    margin-bottom: 8px;
    margin: 0 0 8px 0;
}

.pc-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s;
    box-sizing: border-box;
    background: white;
    color: var(--theme-color-main, #111827);
    font-family: inherit;
    line-height: initial;
}

.pc-form-input:focus {
    outline: none;
    border-color: var(--primary, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pc-search-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary, #3b82f6);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    line-height: initial;
    white-space: nowrap;
}

.pc-search-btn:hover {
    background: var(--primary-darken-1, #2563eb);
}

.pc-search-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pc-period-info {
    background: #eff6ff;
    border-radius: 8px;
    padding: 16px;
    font-size: 14px;
    color: #1e40af;
    margin: 0;
}

.pc-loading {
    text-align: center;
    padding: 48px 0;
    margin: 0;
}

.pc-spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid var(--primary, #3b82f6);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: pc-spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes pc-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.pc-no-results {
    text-align: center;
    padding: 48px 0;
    color: var(--theme-color-main, #6b7280);
    margin: 0;
}

/* SVG иконки */
.pc-no-results-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background-image: url("data:image/svg+xml,%3Csvg fill='none' viewBox='0 0 24 24' stroke='%239ca3af' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.pc-fallback-image-icon {
    width: 48px;
    height: 48px;
    background-image: url("data:image/svg+xml,%3Csvg fill='none' viewBox='0 0 24 24' stroke='%239ca3af' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.fallback-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--theme-color-main, #9ca3af);
}

.pc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
    margin-top: 24px;
    margin: 24px 0 0 0;
}

.pc-result-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.3s;
    margin: 0;
}

.pc-result-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.pc-result-image {
    width: 100%;
    height: 200px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-color-main, #9ca3af);
    margin: 0;
}

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

.pc-result-content {
    padding: 20px;
    margin: 0;
}

.pc-result-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--theme-color-title, #111827);
    margin-bottom: 8px;
    margin: 0 0 8px 0;
}

.pc-result-description {
    color: var(--theme-color-main, #6b7280);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.pc-price-info {
    margin-bottom: 16px;
    margin: 0 0 16px 0;
}

.pc-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    margin: 0 0 8px 0;
}

.pc-price-label {
    font-size: 14px;
    color: var(--theme-color-main, #6b7280);
    margin: 0;
}

.pc-price-value {
    font-weight: 600;
    margin: 0;
}

.pc-price-avg {
    color: var(--primary, #3b82f6);
    font-size: 16px;
}

.pc-price-total {
    color: #059669;
    font-size: 18px;
}

.pc-book-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary, #3b82f6);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    font-size: 14px;
}

.pc-book-btn:hover {
    background: var(--primary-darken-1, #2563eb);
}

.pc-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    margin: 0 0 24px 0;
}

.pc-results-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--theme-color-title, #111827);
    margin: 0;
}

@media (max-width: 768px) {
    .pc-form-grid {
        grid-template-columns: 1fr;
    }

    .pc-results-grid {
        grid-template-columns: 1fr;
    }
}

.template {
    display: none;
}

body.landing-editor .template {
    display: block;
}

body.landing-editor .result-image {
    display: none;
}

.fallback-image {
    display: none;
}

body.landing-editor .fallback-image {
    display: flex;
}

/* Стили для кнопки календаря */
.pc-calendar-btn {
    background: var(--secondary, #6c757d);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

/* Модальное окно бронирования */
body.pc-modal-open {
    overflow: hidden;
}

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

.pc-booking-modal.is-visible {
    display: flex;
}

.pc-booking-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(2px);
}

.pc-booking-modal-dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    width: min(960px, 92%);
    height: min(90vh, 720px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.pc-booking-iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
    background: #fff;
}

.pc-booking-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.08);
    color: #111827;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pc-booking-modal-close:hover {
    background: rgba(15, 23, 42, 0.15);
}

@media (max-width: 640px) {
    .pc-booking-modal-dialog {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        max-width: none;
        max-height: none;
    }

    .pc-booking-modal-close {
        top: 12px;
        right: 12px;
    }
}