/* Sunset Tour Search - v2.2.0 */

/* ========== BASE WRAPPER ========== */
.sts-wrapper {
    --sts-primary: #00809f;
    --sts-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 100;
}
.sts-wrapper * {
    box-sizing: border-box;
}
.sts-box {
    background: #fff;
    border-radius: var(--sts-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    position: relative;
}
.sts-form {
    display: flex;
    flex-wrap: wrap;
    padding: 8px;
    gap: 4px;
    align-items: stretch;
    margin: 0;
}

/* ========== FIELDS ========== */
.sts-field {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.sts-field:hover {
    background: #f8f9fa;
}
.sts-icon {
    width: 40px;
    height: 40px;
    background: var(--sts-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}
.sts-icon svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    fill: none;
}
.sts-content {
    flex: 1;
    min-width: 0;
}
.sts-content label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 2px;
}
.sts-content input {
    width: 100%;
    border: none;
    background: none;
    font-size: 14px;
    color: #333;
    outline: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
}
.sts-content input::placeholder {
    color: #999;
}
.sts-clear {
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #666;
    margin-left: 8px;
}
.sts-clear:hover {
    background: #fee;
    color: #e00;
}

/* Field sizes */
.sts-field-dest {
    flex: 2;
    min-width: 200px;
    border-right: 1px solid #eee;
}
.sts-field-date {
    flex: 1;
    min-width: 140px;
    border-right: 1px solid #eee;
}
.sts-field-guests {
    flex: 1;
    min-width: 140px;
}
.sts-field-ai {
    padding: 4px;
}
.sts-field-submit {
    padding: 4px;
}

/* ========== AI BUTTON - NO BORDER ========== */
.sts-ai-btn {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}
.sts-ai-btn:hover {
    background: rgba(0,128,159,0.06);
    transform: scale(1.05);
}
.sts-ai-btn:focus,
.sts-ai-btn:active {
    outline: none;
    border: none;
    box-shadow: none;
}
.sts-ai-btn img {
    width: 32px;
    height: 32px;
    display: block;
}

/* ========== SUBMIT BUTTON ========== */
.sts-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--sts-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.sts-submit:hover {
    background: #006680;
}
.sts-submit svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    fill: none;
}

/* ========== TRAVELERS POPUP - UNIQUE SELECTORS ========== */
#sts-travelers-dropdown {
    display: none;
    position: absolute;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 280px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    padding: 20px;
    z-index: 99999;
    box-sizing: border-box;
}
#sts-travelers-dropdown.sts-popup-visible {
    display: block;
}
.sts-travelers-popup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
}
.sts-travelers-popup-row:first-child {
    padding-top: 0;
}
.sts-travelers-popup-row:last-child {
    padding-bottom: 0;
}
.sts-travelers-popup-row + .sts-travelers-popup-row {
    border-top: 1px solid #f0f0f0;
}
.sts-travelers-popup-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sts-travelers-popup-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.sts-travelers-popup-subtitle {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}
.sts-travelers-popup-counter {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sts-travelers-popup-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background-color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
    margin: 0;
}
.sts-travelers-popup-btn:hover:not(:disabled) {
    border-color: #00809f;
    color: #00809f;
}
.sts-travelers-popup-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.sts-travelers-popup-count {
    font-weight: 600;
    font-size: 15px;
    width: 24px;
    text-align: center;
    color: #333;
}

/* ========== RESULTS DROPDOWN ========== */
.sts-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: var(--sts-radius);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    max-height: 350px;
    overflow: hidden;
    display: none;
    z-index: 250;
}
.sts-wrapper.show-results .sts-results {
    display: block;
}
.sts-results-head {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f0f0;
}
.sts-results-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
}
.sts-results-loading,
.sts-results-empty {
    display: none;
    padding: 30px;
    text-align: center;
    color: #888;
}
.sts-wrapper.loading .sts-results-loading {
    display: block;
}
.sts-wrapper.loading .sts-results-list,
.sts-wrapper.loading .sts-results-head {
    display: none;
}
.sts-wrapper.no-results .sts-results-empty {
    display: block;
}
.sts-wrapper.no-results .sts-results-list,
.sts-wrapper.no-results .sts-results-head {
    display: none;
}
.sts-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #eee;
    border-top-color: var(--sts-primary);
    border-radius: 50%;
    animation: sts-spin 0.8s linear infinite;
    margin: 0 auto 10px;
}
@keyframes sts-spin {
    to { transform: rotate(360deg); }
}

/* ========== RESULT ITEMS ========== */
.sts-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.sts-item:hover {
    background: #f5f8fa;
}
.sts-item-img {
    width: 70px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}
.sts-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sts-item-info {
    flex: 1;
    min-width: 0;
}
.sts-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sts-item-meta {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}
.sts-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--sts-primary);
    margin-top: 2px;
}

/* ========== FLATPICKR CALENDAR ========== */
.flatpickr-calendar {
    font-family: inherit !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15) !important;
    padding: 8px !important;
}
.flatpickr-months {
    padding: 4px 0;
}
.flatpickr-current-month {
    font-size: 14px;
    font-weight: 600;
}
.flatpickr-weekday {
    font-size: 12px;
    font-weight: 600;
    color: #888;
}
.flatpickr-day {
    border-radius: 8px;
    font-size: 13px;
    height: 36px;
    line-height: 36px;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: #00809f !important;
    border-color: #00809f !important;
}
.flatpickr-day.today {
    border-color: #00809f;
}

/* ========== MODAL ========== */
.sts-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.sts-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}
.sts-modal-box {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.sts-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}
.sts-modal-close:hover {
    background: #fee;
    color: #e00;
}
.sts-modal-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
}
.sts-modal-box h3 {
    font-size: 22px;
    margin: 0 0 10px;
    color: #333;
}
.sts-modal-box p {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .sts-form {
        flex-direction: column;
    }
    .sts-field {
        border-right: none !important;
        border-bottom: 1px solid #eee;
    }
    .sts-field-dest,
    .sts-field-date,
    .sts-field-guests {
        flex: none;
        width: 100%;
    }
    .sts-field-ai,
    .sts-field-submit {
        flex: 1;
    }
    .sts-field:last-child {
        border-bottom: none;
    }
    .sts-submit {
        width: 100%;
    }
    #sts-travelers-dropdown {
        width: calc(100% - 16px);
        left: 8px;
        right: 8px;
    }
}
