/**
 * AI Travel Planner for KoreaFerry - Styles
 * 
 * [수정됨] 히어로 섹션 그라디언트 배경 추가
 * [수정됨] travelwing 참고하되 차별화된 디자인
 */

/* 기본 컨테이너 */
.atp-kf-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 히어로 섹션 [수정됨] 그라디언트 배경 */
.atp-kf-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    padding: 50px 30px;
    text-align: center;
    color: #fff;
}

.atp-kf-hero h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 15px;
    letter-spacing: -0.5px;
}

.atp-kf-hero h2 .japan-flag {
    margin-left: 8px;
}

.atp-kf-hero-subtitle {
    font-size: 17px;
    margin: 0 0 25px;
    opacity: 0.95;
}

/* 배지 스타일 */
.atp-kf-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.atp-kf-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
}

.atp-kf-badge.light {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.atp-kf-badge.highlight {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
}

/* 폼 섹션 */
.atp-kf-section {
    padding: 35px 30px;
    background: #fff;
}

/* 폼 그리드 */
.atp-kf-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 600px) {
    .atp-kf-form-grid {
        grid-template-columns: 1fr;
    }
}

/* 필드 */
.atp-kf-field {
    display: flex;
    flex-direction: column;
}

.atp-kf-field label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
    font-size: 14px;
}

.atp-kf-field select,
.atp-kf-field input {
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #fafafa;
    color: #333;
}

.atp-kf-field select:focus,
.atp-kf-field input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.atp-kf-field input.atp-kf-readonly {
    background: #f0f0f0;
    color: #888;
    cursor: not-allowed;
}

.atp-kf-field input::placeholder {
    color: #aaa;
}

/* 제출 버튼 */
.atp-kf-submit-section {
    padding: 20px 30px 40px;
    text-align: center;
}

.atp-kf-submit-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 60px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    width: 100%;
    max-width: 500px;
}

.atp-kf-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

.atp-kf-submit-btn small {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 6px;
}

/* 로딩 */
.atp-kf-loading {
    text-align: center;
    padding: 80px 30px;
}

.atp-kf-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    margin: 0 auto 25px;
    animation: atp-kf-spin 1s linear infinite;
}

@keyframes atp-kf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.atp-kf-loading p {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
}

.atp-kf-loading small {
    color: #888;
}

/* 결과 영역 */
.atp-kf-result {
    padding: 0 30px 30px;
}

/* [수정됨] 히어로와 결과 사이 간격 50px */
.atp-kf-result-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 30px;
    border-radius: 16px;
    margin-top: 50px;
    margin-bottom: 25px;
}

.atp-kf-result-summary h3 {
    margin: 0 0 20px;
    font-size: 24px;
}

.atp-kf-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
}

.atp-kf-summary-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.atp-kf-summary-item .label {
    font-size: 12px;
    opacity: 0.85;
}

.atp-kf-summary-item .value {
    font-size: 18px;
    font-weight: 700;
    margin-top: 5px;
}

/* 승선권 정보 [KoreaFerry] */
.atp-kf-ferry-info {
    background: #f8f9fc;
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 2px solid #e8e8e8;
}

.atp-kf-ferry-info h4 {
    margin: 0 0 8px;
    color: #667eea;
    font-size: 20px;
}

.atp-kf-ferry-route {
    margin: 0 0 20px;
    color: #666;
    font-size: 14px;
}

.atp-kf-ferry-details {
    margin-bottom: 20px;
}

.atp-kf-ferry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.atp-kf-ferry-item {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #eee;
}

.atp-kf-ferry-item .direction {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.atp-kf-ferry-item .price {
    font-size: 28px;
    font-weight: 800;
    color: #667eea;
    margin: 8px 0;
}

.atp-kf-ferry-item .note {
    font-size: 12px;
    color: #999;
}

.atp-kf-ferry-item.total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
}

.atp-kf-ferry-item.total .direction,
.atp-kf-ferry-item.total .note {
    color: rgba(255, 255, 255, 0.85);
}

.atp-kf-ferry-item.total .price {
    color: #fff;
}

/* 운항 스케줄 */
.atp-kf-ferry-schedule {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 10px;
    font-size: 13px;
    border: 1px solid #eee;
}

.schedule-item strong {
    color: #667eea;
    white-space: nowrap;
}

.schedule-item span {
    color: #555;
}

.atp-kf-api-notice {
    text-align: center;
    margin: 15px 0 0;
}

.atp-kf-api-notice small {
    color: #dc2626;
    font-weight: 600;
    font-size: 14px;
}

/* 일정 섹션 */
.atp-kf-itinerary-section {
    margin-bottom: 25px;
}

.atp-kf-itinerary-section h4 {
    font-size: 20px;
    margin: 0 0 20px;
    color: #333;
}

/* 일정 타임라인 */
.atp-kf-day {
    margin-bottom: 20px;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
}

.atp-kf-day-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.atp-kf-day-title {
    font-weight: 700;
    font-size: 16px;
}

.atp-kf-day-date {
    font-size: 14px;
    opacity: 0.9;
}

.atp-kf-activities {
    padding: 20px;
}

.atp-kf-activity {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
}

.atp-kf-activity:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.atp-kf-activity-icon {
    font-size: 28px;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.atp-kf-activity-content {
    flex: 1;
}

.atp-kf-activity-time {
    font-size: 13px;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 3px;
}

.atp-kf-activity-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    color: #333;
}

.atp-kf-activity-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* CTA 버튼 */
.atp-kf-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 25px;
}

.atp-kf-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #fff;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
}

.atp-kf-cta-btn:hover {
    background: #667eea;
    color: #fff;
}

/* 액션 버튼 */
.atp-kf-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* [신규] 경고 메시지 스타일 */
.atp-kf-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    color: #92400e;
    padding: 15px 20px;
    border-radius: 12px;
    margin: 15px 0;
    font-weight: 600;
    text-align: center;
}

.atp-kf-btn-secondary {
    padding: 16px 35px;
    background: #f0f0f0;
    color: #555;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.atp-kf-btn-secondary:hover {
    background: #e5e5e5;
}

.atp-kf-btn-primary {
    padding: 16px 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}

.atp-kf-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45);
}

/* 반응형 */
@media (max-width: 768px) {
    .atp-kf-container {
        margin: 10px;
        border-radius: 16px;
    }
    
    .atp-kf-hero {
        padding: 40px 20px;
    }
    
    .atp-kf-hero h2 {
        font-size: 24px;
    }
    
    .atp-kf-hero-subtitle {
        font-size: 15px;
    }
    
    .atp-kf-badges {
        gap: 8px;
    }
    
    .atp-kf-badge {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .atp-kf-section {
        padding: 25px 20px;
    }
    
    .atp-kf-submit-section {
        padding: 15px 20px 30px;
    }
    
    .atp-kf-submit-btn {
        padding: 18px 30px;
        font-size: 18px;
    }
    
    .atp-kf-result {
        padding: 0 20px 20px;
    }
    
    .atp-kf-result-summary {
        padding: 20px;
    }
    
    .atp-kf-ferry-info {
        padding: 20px;
    }
    
    .atp-kf-ferry-schedule {
        grid-template-columns: 1fr;
    }
    
    .atp-kf-actions {
        flex-direction: column;
    }
    
    .atp-kf-btn-secondary,
    .atp-kf-btn-primary {
        width: 100%;
    }
}

/* ==========================================
 * [v1.5] 변형 시스템 네비게이션
 * ========================================== */
.atp-kf-variation-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #e8f4fc 0%, #f0f7ff 100%);
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 10px;
    border: 1px solid #b3d9f2;
}

.atp-kf-var-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.atp-kf-var-btn:hover:not(:disabled) {
    background: #0056b3;
    transform: scale(1.05);
}

.atp-kf-var-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.atp-kf-var-info {
    text-align: center;
    flex: 1;
}

.atp-kf-var-info strong {
    display: block;
    font-size: 16px;
    color: #333;
}

.atp-kf-var-count {
    color: #666;
    font-size: 12px;
    margin-left: 5px;
}

.atp-kf-var-info small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 3px;
}

/* 경고 메시지 스타일 개선 */
.atp-kf-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 5px;
    color: #856404;
    font-size: 14px;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .atp-kf-variation-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .atp-kf-var-info {
        order: -1;
    }
    
    .atp-kf-var-btn {
        width: 100%;
    }
}
