/* static/css/wakuwakuyoyaku_base.css */
/* --- 基本設定 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;/* 欧文フォントを先に指定し、日本語フォントはその後ろに */
    background-color: #F5F5F5;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0; 
}

.container {
    max-width: 90%;
    margin: 50px auto 0; /* 上:50px、左右:自動で中央寄せ */
    flex: 1; 
}

/* 見出し */
.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 12px 0;
    font-size: 1.5rem;
    font-weight: 500;
    font-size: 26px;
    line-height: 140%;
    letter-spacing: 0.03em;
}

/* 左右の要素 */
.title-left,.title-right
 {
    align-items: center;
}

/* ナビゲーションバー */
.navbar {
    background-color: #ffffff;
    color: #000000;
    padding: 1rem 1rem; /* 上下左右の余白 */
    border-bottom: 3px solid #1B4599;
    border-radius: 0; /* 角の丸みを無くす */
}

.navbar .container-fluid {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.navbar-brand {
    font-weight: 700;
    font-size: 16px;
    color: #1B4599;
    text-decoration: none;
    line-height: 100%;
    letter-spacing: 0.05em;
    margin-right: auto;
}

/* 右側グループ */
.navbar-right-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ユーザー名表示 */
.head_name {
    color: #000000;
    font-size: 15px;
    white-space: nowrap; /* 改行を防ぐ */
}

/* ハンバーガーメニューボタン */
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    flex-shrink: 0;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #1B4599;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

h2 {
    font-weight: 500;
    font-size: 26px;
    line-height: 140%;
    color: #282828;
}

h3 {
    font-weight: 400;
    font-size: 20px;
    color: #282828;
}

/* フォームセクション */
.form-section {
    background-color: white;
    margin-bottom: 30px;
    overflow: hidden;
    color: #30728A;
}

.section-title {
    width: 100%;
    padding: 15px;
    background-color: #50BCCC;
    font-weight: 500;
    font-size: 17px;
    line-height: 140%;
    letter-spacing: 0.03em;
    color: #FFFFFF;
}

.section-subtitle {
    width: 100%;
    padding: 15px;
    background-color: #B7DFE5;
    font-weight: 500;
    font-size: 15px;
    line-height: 140%;
    letter-spacing: 0.03em;
    color: #30728A;
}

/* 注意書き */
.notice {
    padding: 20px;
    margin-bottom: 30px;
}

.notice p {
    margin-bottom: 8px;
    font-size: 14px;
}

.user-info-section {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.user-avatar {
    flex-shrink: 0;
}

.avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A6FA5 0%, #5B7DB1 100%);
    border: 2px solid #2D4A7C;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* アバター画像（実際の写真） */
.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像を枠にフィット */
    object-position: center; /* 中央を基準にトリミング */
}

/* アバターアイコン（デフォルト） */
.avatar-icon {
    width: 120px;
    height: 120px;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1; 
}

.user-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 12px 0;
    font-size: 1.5rem;
    font-weight: 500;
    font-size: 26px;
    line-height: 140%;
    letter-spacing: 0.03em;
}

.user-id-box {
    box-sizing: border-box;
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 7px 10px;
    gap: 4px;
    height: 30px;

    /* 白 */
    background: #FFFFFF;
    border: 1px solid #D2DAE8;
    border-radius: 4px;
}

.user-id-label {
    color: #333;
    font-weight: 400;
    font-size: 15px;
}

.user-id-value {
    color: #333;
    font-weight: 400;
    font-size: 15px;
}

/* 利用者情報ボタン */
.user-info-button {
    padding: 16px 32px;
    background-color: #fff;
    border: 2px solid #2D4A7C;
    border-radius: 8px;
    color: #2D4A7C;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.user-info-button:hover {
    background-color: #2D4A7C;
    color: #fff;
}

.arrow {
    margin-left: 8px;
    font-weight: bold;
}

/* フッター */
.site-footer {
    text-align: center;
    padding: 30px 0;
    color: #666;
    font-size: 12px;
    margin-top: auto; /* 追加：自動的に下に配置 */
}

.error-group {
    font-size: 14px;
    color: #FF0000
}

/* メッセージ表示エリア */
.messages-container {
    margin-bottom: 20px;
}

/* 各メッセージの基本スタイル */
.message {
    padding: 10px 15px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
}

/* メッセージの種類ごとの色分け (Djangoのmessage.tagsに対応) */
.message-debug { background-color: #e7e7e7; border-color: #d6d6d6; color: #444; }
.message-info { background-color: #d9edf7; border-color: #bce8f1; color: #31708f; }
.message-success { background-color: #dff0d8; border-color: #d6e9c6; color: #3c763d; }
.message-warning { background-color: #fcf8e3; border-color: #faebcc; color: #8a6d3b; }
.message-error { background-color: #f2dede; border-color: #ebccd1; color: #a94442; }

.message-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    animation: slideIn 0.3s ease-out;
}

/* 警告メッセージ */
.alert {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
}

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

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border-left: 4px solid #198754;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
    border-left: 4px solid #0dcaf0;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.message-toast .message {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .avatar-circle {
        width: 50px;
        height: 50px;
        border: 2px solid #2D4A7C;
    }
    
    .avatar-icon {
        width: 70px;
        height: 70px;
    }
}