/* 城际出行平台自定义组件样式 */

/* 主色调变量 */
:root {
    --primary-color: #0066ff;
    --secondary-color: #ff6600;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
    --gray-light-color: #e9ecef;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 班次卡片特殊样式 */
.schedule-card {
    position: relative;
    overflow: hidden;
}

.schedule-card::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 0 0.75rem 0.75rem 0;
}

/* 标签样式 */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.tag-primary {
    background-color: rgba(0, 102, 255, 0.1);
    color: var(--primary-color);
}

.tag-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.tag-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.tag-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

/* 输入框样式 */
.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--gray-light-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* 评分样式 */
.rating {
    display: flex;
    align-items: center;
}

.rating-stars {
    color: var(--warning-color);
    margin-right: 0.5rem;
}

/* 地图容器 */
.map-container {
    width: 100%;
    height: 200px;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

/* 路线信息 */
.route-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.route-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
    margin-right: 0.5rem;
}

.route-line {
    flex: 1;
    height: 2px;
    background-color: var(--gray-light-color);
    position: relative;
}

.route-line::before,
.route-line::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--gray-color);
    top: 50%;
    transform: translateY(-50%);
}

.route-line::before {
    left: 30%;
}

.route-line::after {
    left: 70%;
}

/* SOS按钮 */
.sos-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--danger-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.3);
    z-index: 100;
    font-weight: bold;
    font-size: 14px;
}

/* 滑动删除 */
.swipe-action {
    position: relative;
    overflow: hidden;
}

.swipe-content {
    transition: transform 0.3s ease;
}

.swipe-action-button {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    width: 80px;
    background-color: var(--danger-color);
}

/* 高对比度主题 */
.high-contrast {
    --primary-color: #0078d7;
    --secondary-color: #ff8c00;
    --success-color: #107c10;
    --danger-color: #e81123;
    --warning-color: #ffb900;
    --light-color: #ffffff;
    --dark-color: #000000;
    --gray-color: #505050;
    --gray-light-color: #d0d0d0;
    
    background-color: var(--light-color);
    color: var(--dark-color);
}

.high-contrast .card {
    border: 1px solid var(--dark-color);
}

/* 加载动画 */
.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 102, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}