/* Study Abroad Cost Simulator Styles */

.sacs-simulator-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.sacs-title {
    color: #333;
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
}

/* 進捗バー */
.sacs-progress-container {
    margin-bottom: 30px;
}

.sacs-progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.sacs-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba 0%, #00a0d2 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 33.33%;
}

.sacs-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sacs-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.sacs-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e1e5e9;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.sacs-step-label {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    font-weight: 500;
    transition: color 0.3s ease;
}

.sacs-step.sacs-step-active .sacs-step-number {
    background-color: #007cba;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3);
}

.sacs-step.sacs-step-active .sacs-step-label {
    color: #007cba;
    font-weight: 600;
}

.sacs-step.sacs-step-completed .sacs-step-number {
    background-color: #28a745;
    color: white;
}

.sacs-step.sacs-step-completed .sacs-step-label {
    color: #28a745;
    font-weight: 600;
}

/* ステップ間の接続線 */
.sacs-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 16px;
    left: calc(50% + 16px);
    right: calc(-50% + 16px);
    height: 2px;
    background-color: #e1e5e9;
    z-index: -1;
}

.sacs-step.sacs-step-completed:not(:last-child)::after {
    background-color: #28a745;
}

.sacs-simulator-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* フォームグループの表示制御 */
.sacs-form-group.sacs-hidden {
    display: none;
}

.sacs-form-group {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* リセットグループは常に表示 */
.sacs-reset-group {
    display: flex !important;
    opacity: 1 !important;
}

.sacs-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.sacs-form-control {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.sacs-form-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.sacs-form-control:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.sacs-reset-button {
    background: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    align-self: center;
    margin: 0 auto;
}

.sacs-reset-button:hover {
    background: #dee2e6;
    border-color: #adb5bd;
}

.sacs-cost-result {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.sacs-cost-result.sacs-hidden {
    display: none !important;
}

.sacs-result-title {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.sacs-cost-info {
    text-align: center;
}

.sacs-cost-info p {
    margin: 0 0 15px 0;
    color: #555;
    font-size: 16px;
}

.sacs-cost-amount {
    font-size: 28px;
    font-weight: bold;
    color: #007cba;
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 2px solid #e1e5e9;
}

.sacs-cost-min {
    color: #28a745;
}

.sacs-cost-max {
    color: #dc3545;
}

.sacs-cost-note {
    margin-top: 15px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
}

.sacs-cost-note small {
    color: #856404;
    font-size: 12px;
    line-height: 1.4;
}

.sacs-no-data {
    text-align: center;
    color: #6c757d;
    padding: 20px;
}

.sacs-no-data p {
    margin: 0;
    font-size: 16px;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .sacs-simulator-container {
        margin: 10px;
        padding: 15px;
    }
    
    .sacs-title {
        font-size: 20px;
    }
    
    .sacs-progress-container {
        margin-bottom: 25px;
    }
    
    .sacs-step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .sacs-step-label {
        font-size: 11px;
    }
    
    .sacs-form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .sacs-cost-amount {
        font-size: 24px;
        padding: 12px;
    }
    
    .sacs-cost-result {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .sacs-simulator-container {
        margin: 5px;
        padding: 10px;
    }
    
    .sacs-title {
        font-size: 18px;
    }
    
    .sacs-progress-container {
        margin-bottom: 20px;
    }
    
    .sacs-step-number {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
    
    .sacs-step-label {
        font-size: 10px;
    }
    
    .sacs-cost-amount {
        font-size: 20px;
        padding: 10px;
    }
    
    .sacs-cost-info p {
        font-size: 14px;
    }
}

/* アニメーション */
.sacs-cost-result {
    animation: sacsFadeIn 0.5s ease-in-out;
}

@keyframes sacsFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .sacs-simulator-container {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .sacs-title {
        color: #e2e8f0;
    }
    
    .sacs-form-group label {
        color: #cbd5e0;
    }
    
    .sacs-form-control {
        background-color: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .sacs-form-control:focus {
        border-color: #63b3ed;
        box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.1);
    }
    
    .sacs-form-control:disabled {
        background-color: #2d3748;
        color: #a0aec0;
    }
    
    .sacs-cost-result {
        background: #4a5568;
        border-left-color: #63b3ed;
    }
    
    .sacs-result-title {
        color: #e2e8f0;
    }
    
    .sacs-cost-info p {
        color: #cbd5e0;
    }
    
    .sacs-cost-amount {
        background: #2d3748;
        border-color: #718096;
    }
    
    .sacs-cost-note {
        background: #744210;
        border-color: #975a16;
    }
    
    .sacs-cost-note small {
        color: #f6e05e;
    }
    
    .sacs-no-data {
        color: #a0aec0;
    }
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .sacs-simulator-container {
        border-width: 2px;
    }
    
    .sacs-form-control {
        border-width: 2px;
    }
    
    .sacs-cost-result {
        border-left-width: 6px;
    }
    
    .sacs-cost-amount {
        border-width: 3px;
    }
}

/* フォーカス可視性の向上 */
.sacs-form-control:focus,
.sacs-reset-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* プリント用スタイル */
@media print {
    .sacs-simulator-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .sacs-reset-button {
        display: none;
    }
    
    .sacs-cost-result {
        border-left-color: #000;
    }
}
