/* ========================================
   ͨ������������ʽ
   ����ͳһ��ҳ���б�ҳ����������ʽ
   ======================================== */

/* ==================== ������ǩ������ ==================== */
.float-search-form {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 24px;
}

.float-search-row {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: nowrap;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 6px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* �������֮��ķָ��� */
.float-label-group,
.float-select-group,
.day-diff-wrapper {
    position: relative;
}

.float-label-group::after,
.float-select-group::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 36px;
    background: #f0f0f0;
}

.float-label-group:last-of-type::after,
.float-select-group:last-of-type::after {
    display: none;
}

/* ������ťǰ����ʾ�ָ��� */
.swap-btn + .float-label-group::before {
    display: none;
}

.trip-type-select {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.day-diff-wrapper {
    width: 50px;
    height: 46px;
    border: none;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    margin: 0 4px;
}

.day-diff-wrapper .day-diff {
    margin: 0;
}

.is-hidden {
    display: none !important;
}

.inline-flex {
    display: inline-flex !important;
}

.flex-visible {
    display: flex !important;
}

/* ������ǩ������ */
.float-label-group {
    position: relative;
    flex: 1;
    min-width: 140px;
}

.float-input {
    width: 100%;
    height: 52px;
    padding: 24px 12px 6px 16px;
    border: 1px solid var(--border-color); /* 恢复默认边框 */
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 500;
    background: transparent;
    transition: var(--transition-base);
    box-sizing: border-box;
}

/* 聚合容器内部的输入框去掉边框，保持一体感 */
.float-search-row .float-input,
.float-search-row .float-select {
    border: none !important;
}

.float-input:focus {
    outline: none;
    background: rgba(0, 134, 246, 0.05);
}

/* ȷ������������ʾʱ����ʽ */
.return-date {
}

.return-date.show,
.float-search-row .return-date[style*="display: block"],
.float-search-row .return-date[style*="display:block"] {
    display: flex !important;
}

.float-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #999;
    background: #fff;
    padding: 0 4px;
    pointer-events: none;
    transition: all 0.3s;
    z-index: 1;
}

/* �ϸ�״̬ */
.float-input:not(:placeholder-shown) ~ .float-label,
.float-input:focus ~ .float-label,
.float-input[value]:not([value=""]) ~ .float-label {
    top: 10px;
    font-size: 11px;
    color: var(--primary-color);
    font-weight: 500;
}

/* ���н��������� */
.city-suggest {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-height: 200px;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    z-index: 10;
    display: none;
    margin-top: 4px;
}

.city-suggest.show {
    display: block;
}

.city-suggest-item {
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.city-suggest-item:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.city-suggest-item:last-child {
    border-bottom: none;
}

/* ==================== ������ť ==================== */
.swap-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-round);
    border: none;
    background: #f0f2f5;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    flex-shrink: 0;
    margin: 0 6px;
}

.swap-btn:hover {
    background: #e4e7ed;
    color: var(--primary-color);
}

.swap-btn:active {
    background: var(--primary-color);
    color: #fff;
}

.swap-btn i {
    font-size: 16px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.swap-btn.swapped i {
    transform: rotate(180deg);
}

/* ==================== ��λѡ��� ==================== */
.float-select-group {
    position: relative;
    min-width: 100px;
}

.float-select {
    width: 100%;
    height: 52px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 14px;
    background: transparent;
    cursor: pointer;
    transition: var(--transition-base);
}

.float-select:focus {
    outline: none;
    background: rgba(255, 154, 3, 0.08);
}

/* ==================== ������ť ==================== */
.btn-search-primary {
    height: 48px;
    padding: 0 28px;
    background: linear-gradient(135deg, var(--brand-accent), #FF8A00);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(255, 154, 3, 0.4);
    margin-left: 8px;
}

.btn-search-primary:hover {
    background: linear-gradient(135deg, #FF9A03, #FF8A00);
    box-shadow: 0 6px 16px rgba(255, 154, 3, 0.45);
    transform: translateY(-1px);
}

.btn-search-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 154, 3, 0.3);
}

.btn-search-primary i {
    font-size: 16px;
}

/* ==================== ��ѡ��ť�� ==================== */
.radio-group {
    display: flex;
    gap: 16px;
    align-items: center;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    margin: 0;
}

.radio-group input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-accent);
    cursor: pointer;
}

/* ==================== ���Ұ�ť�� ==================== */
.capsule-group {
    display: inline-flex;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    background: #f0f2f5;
    margin-right: 12px;
}

.capsule-group .capsule-btn {
    border: none;
    background: transparent;
    padding: 8px 18px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: var(--transition-base);
    min-width: 60px;
    border-radius: 20px;
}

.capsule-group .capsule-btn.active {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 134, 246, 0.2);
}

.capsule-group .capsule-btn:hover:not(.active) {
    background: #e8e8e8;
    color: #333;
}

/* ==================== ��Ӧʽ ==================== */
@media (max-width: 768px) {
    .float-search-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
    }

    .float-label-group,
    .float-select-group {
        width: 100%;
        min-width: 100%;
    }

    .float-label-group::after,
    .float-select-group::after {
        display: none;
    }

    .swap-btn {
        align-self: center;
        margin: 8px 0;
    }

    .btn-search-primary {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        margin-top: 8px;
    }

    .capsule-group {
        margin-bottom: 8px;
    }
}
