/* 共通スタイル - 全ページで使用 */

/* Toastスタイルのフラッシュメッセージ */
.flash {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 350px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
}

.flash.show {
    opacity: 1;
    transform: translateY(0);
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 5px solid #28a745;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 5px solid #dc3545;
}

.flash-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 5px solid #17a2b8;
}

.flash-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 5px solid #ffc107;
}

/* 基本テーブルスタイル */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.detail-table th,
.detail-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #ddd;
}

.detail-table th {
    background-color: #f2f2f2;
    width: 30%;
    font-weight: bold;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #f2f2f2;
}

/* 共通ボタンスタイル */
.btn {
    display: inline-block;
    background-color: #f8f9fa;
    color: #495057;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    margin-right: 0.5rem;
    border: 1px solid #dee2e6;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn:hover {
    background-color: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #495057;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    margin-right: 0.25rem;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    color: white;
}

.btn-edit {
    background-color: #28a745;
    color: white;
}

.btn-edit:hover {
    background-color: #218838;
}

/* 共通コンテナ */
.patient-container {
    padding: 2rem;
}

.patient-container h2 {
    margin-bottom: 2rem;
}

.treatment-record-container {
    padding: 2rem;
}

.treatment-record-container h2 {
    margin-bottom: 2rem;
}

.info-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.info-section h3 {
    margin-bottom: 1rem;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-table th,
.info-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.info-table th {
    background-color: #f1f3f4;
    width: 25%;
    font-weight: 600;
    color: #495057;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
    border-bottom: none;
}

.info-table tr:hover {
    background-color: #f8f9fa;
}

.info-content {
    padding: 1rem;
    background-color: #fff;
    border-radius: 4px;
    min-height: 60px;
    line-height: 1.6;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
    padding: 1rem 0;
}

.action-buttons {
    margin-bottom: 1.5rem;
}

.detail-section {
    margin-bottom: 2rem;
}

/* ユーティリティクラス */
.text-right {
    text-align: right;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        margin-bottom: 0.5rem;
        width: 100%;
        text-align: center;
    }
}

/* 印刷時のスタイル */
@media print {
    .actions {
        display: none;
    }

    .flash {
        display: none;
    }
}