/* ================================================
   Common Styles Bundle
   Source order: base -> header-footer -> forms -> components
   ================================================ */

/* ================================================
   Base Styles - カフェ遊心夢楽
   ================================================ */

/* リセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ベースフォント設定 */
body {
    font-family: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W6", "Yu Gothic", "游ゴシック", "Meiryo", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    line-height: 1.7;
    background: #fff;
}

/* 見出しは明朝体 */
h1, h2, h3, h4, h5, h6 {
    font-family: "游明朝", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "HG明朝E", "ＭＳ Ｐ明朝", "MS PMincho", serif;
    font-weight: 800;
    color: #333;
}

/* リンク */
a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

/* ボタン基本スタイル */
button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* リスト */
ul, ol {
    list-style: none;
}

/* 画像 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 入力フィールド */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* カラーユーティリティ */
.text-primary { color: #2ea3f2; }
.text-success { color: #4caf50; }
.text-danger { color: #f44336; }
.text-warning { color: #ff9800; }
.text-muted { color: #999; }

.bg-primary { background-color: #2ea3f2; }
.bg-success { background-color: #4caf50; }
.bg-danger { background-color: #f44336; }
.bg-warning { background-color: #ff9800; }
.bg-light { background-color: #f5f5f5; }

/* ローディング */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(46, 163, 242, 0.3);
    border-radius: 50%;
    border-top-color: #2ea3f2;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* レスポンシブヘルパー */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}


/* ===== header-footer.css ===== */
/* ================================================
   Header & Footer Styles (matched to cafeyu.xyz)
   ================================================ */

header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
}

.logo a {
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

nav a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

nav a:hover {
    color: #000;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: #666;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

footer {
    background: #2c3e50;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h4 {
    margin-bottom: 20px;
    font-size: 16px;
    color: #fff;
}

.footer-widget p,
.footer-widget a {
    color: #bbb;
    font-size: 14px;
    line-height: 2;
    text-decoration: none;
}

.footer-widget a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    color: #888;
    font-size: 12px;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 10px 15px;
        justify-content: center;
        position: relative;
    }

    .logo {
        margin: 0 auto;
    }

    .logo img {
        height: 40px;
    }

    .hamburger {
        display: flex;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    nav ul {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 60px);
        background: #fff;
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s;
        z-index: 999;
    }

    nav ul.active {
        left: 0;
    }

    nav li {
        width: 100%;
        border-bottom: 1px solid #e0e0e0;
    }

    nav a {
        display: block;
        padding: 15px 20px;
        font-size: 14px;
    }
}


/* ===== forms.css ===== */
/* ================================================
   Form Styles
   ================================================ */

/* フォームグループ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group.required label::after {
    content: " *";
    color: #f44336;
}

/* 入力フィールド */
.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #2ea3f2;
    box-shadow: 0 0 0 3px rgba(46, 163, 242, 0.1);
}

.form-control.error,
input.error,
textarea.error,
select.error {
    border-color: #f44336;
}

.form-control.error:focus,
input.error:focus,
textarea.error:focus,
select.error:focus {
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

/* テキストエリア */
textarea {
    resize: vertical;
    min-height: 100px;
}

/* チェックボックス・ラジオボタン */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.checkbox-label:hover,
.radio-label:hover {
    background-color: #f5f5f5;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
}

/* エラーメッセージ */
.error-message {
    display: block;
    color: #f44336;
    font-size: 13px;
    margin-top: 5px;
}

.success-message {
    display: block;
    color: #4caf50;
    font-size: 13px;
    margin-top: 5px;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: #2ea3f2;
    color: #fff;
}

.btn-primary:hover {
    background: #1e8ad6;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #4caf50;
    color: #fff;
}

.btn-success:hover {
    background: #45a049;
}

.btn-danger {
    background: #f44336;
    color: #fff;
}

.btn-danger:hover {
    background: #da190b;
}

.btn-outline {
    background: transparent;
    border: 2px solid #2ea3f2;
    color: #2ea3f2;
}

.btn-outline:hover {
    background: #2ea3f2;
    color: #fff;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 16px;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 12px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ボタングループ */
.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 検索フォーム */
.search-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.search-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* フォームレイアウト */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}


/* ===== components.css ===== */
/* ================================================
   Table, Card, Modal Styles
   ================================================ */

/* テーブル */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

table tr:hover {
    background: #f9f9f9;
}

table td {
    font-size: 14px;
    color: #666;
}

.table-striped tbody tr:nth-child(even) {
    background: #fafafa;
}

.table-bordered {
    border: 1px solid #e0e0e0;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #e0e0e0;
}

/* レスポンシブテーブル */
@media (max-width: 768px) {
    .table-responsive {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* カード */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.card-header h2,
.card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

/* カードグリッド */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
    position: relative;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* アラート */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.alert-danger {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.alert-warning {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.alert-info {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

/* バッジ */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
}

.badge-primary {
    background: #2ea3f2;
    color: #fff;
}

.badge-success {
    background: #4caf50;
    color: #fff;
}

.badge-danger {
    background: #f44336;
    color: #fff;
}

.badge-warning {
    background: #ff9800;
    color: #fff;
}

.badge-secondary {
    background: #6c757d;
    color: #fff;
}

/* ページネーション */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin: 30px 0;
}

.pagination button,
.pagination a {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.pagination button:hover,
.pagination a:hover {
    background: #f5f5f5;
    border-color: #2ea3f2;
}

.pagination button.active,
.pagination a.active {
    background: #2ea3f2;
    color: #fff;
    border-color: #2ea3f2;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
