/**
 * Settings Page Styles
 * 設定画面専用スタイル
 */

.settings-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.password-requirements {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
}

.password-requirements h4 {
    margin: 0 0 0.5rem 0;
    color: #495057;
}

.password-requirements ul {
    margin: 0;
    padding-left: 1.5rem;
}

.usage-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.usage-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.usage-label {
    flex: 0 0 120px;
    font-weight: bold;
}

.usage-bar {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.usage-progress {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #ffc107, #dc3545);
    transition: width 0.3s ease;
}

.usage-text {
    flex: 0 0 80px;
    text-align: right;
    font-size: 0.875rem;
}

.plan-info {
    border-top: 1px solid #dee2e6;
    padding-top: 2rem;
}

.notification-settings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.notification-info h4 {
    margin: 0 0 0.25rem 0;
}

.notification-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #007bff;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.export-option {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 1rem;
}

.export-option h4 {
    margin: 0 0 0.5rem 0;
}

.export-option p {
    margin: 0 0 1rem 0;
    color: #6c757d;
    font-size: 0.875rem;
}

.danger-zone {
    border-color: #dc3545;
}

.danger-zone .card-header {
    background: #f8d7da;
    color: #721c24;
}

.danger-actions {
    text-align: center;
}

.danger-action h4 {
    color: #dc3545;
    margin-bottom: 0.5rem;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
}

.modal-header h3 {
    margin: 0 0 1rem 0;
    color: #dc3545;
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-body ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.api-key-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.api-key-info {
    flex: 1;
}

.api-key-info small {
    display: block;
    color: #6c757d;
    margin-top: 0.25rem;
}

.api-key-actions {
    display: flex;
    gap: 0.5rem;
}

.form-actions {
    margin-top: 1rem;
}

.system-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.info-label {
    color: #6c757d;
    font-weight: 500;
    flex: 1;
}

.info-value {
    font-weight: bold;
    color: #495057;
    text-align: right;
}

/* 医療専門資格設定スタイル - 改善版 */
.medical-qualification-display {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* メイン表示エリア（目立つスタイル） */
.qualification-main-display {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4f8 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.qualification-display-content {
    margin-bottom: 1rem;
}

.qualification-display-content .no-qualification {
    color: #6c757d;
    font-style: italic;
    font-size: 1.1rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
}

.qualification-display-content .current-qualification-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.qualification-display-content .qualification-details {
    text-align: center;
}

.qualification-display-content .qualification-details .qualification-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.qualification-display-content .qualification-details .qualification-meta {
    font-size: 14px;
    color: #6b7280;
}

.qualification-trust-info {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* 変更セクション（控えめなスタイル） */
.qualification-change-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.qualification-change-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.qualification-warning {
    padding: 0.75rem;
    background: #fef3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.qualification-warning small {
    color: #856404;
    font-weight: 500;
    display: block;
    line-height: 1.4;
}

/* 編集フォーム */
.qualification-edit-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    margin-top: 1rem;
}

.qualification-confirmation {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.confirmation-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.confirmation-checkbox .form-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.confirmation-checkbox .form-label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    color: #856404;
}

/* カードヘッダーのサブタイトル */
.card-subtitle {
    color: #6c757d;
    font-weight: normal;
    margin-top: 0.25rem;
    display: block;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.optional {
    color: #6c757d;
    font-weight: normal;
}

.qualification-info {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #90caf9;
}

.qualification-details h4 {
    margin: 0 0 1rem 0;
    color: #1976d2;
    font-size: 16px;
}

.qualification-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
}

.qualification-preview-name {
    font-weight: 500;
}

.trust-weight-display {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #bbdefb;
}

.trust-weight-display strong {
    color: #1976d2;
    display: block;
    margin-bottom: 0.25rem;
}

.weight-description {
    color: #666;
    font-size: 0.9rem;
}

.weight-explanation {
    margin: 0.5rem 0 0 0;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .usage-item {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .count-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .current-qualification-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}