/* イベントアプリ専用CSS - シンプル版 */

/* 全体のスタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fafafa;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 情報バナー */
.info-banner {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.trophy-icon {
    color: #2196f3;
    font-size: 1.2em;
}

.info-text {
    color: #1565c0;
}

/* 文字数カウンター */
.char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e1e5e9;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.85em;
    color: #6b7280;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

/* イベント名フィールドの文字数カウンター位置調整 */
#title+.char-counter {
    bottom: 50%;
    transform: translateY(50%);
}

.char-counter:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.char-count-display {
    font-weight: 600;
    color: #374151;
    margin-right: 2px;
}

.char-count-label {
    color: #9ca3af;
    font-size: 0.9em;
}

/* 文字数制限に近づいた時の警告表示 */
.char-counter.warning .char-count-display {
    color: #f59e0b;
}

.char-counter.danger .char-count-display {
    color: #ef4444;
}

.char-counter.danger {
    background: rgba(254, 242, 242, 0.95);
    border-color: #fecaca;
}

/* イベント詳細ページ専用スタイル */
.event-detail-card {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    margin-bottom: 20px;
    margin-top: 20px;
}

.event-detail-card .card-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e1e5e9;
    border-radius: 8px 8px 0 0 !important;
    padding: 10px;
    margin-bottom: 10px;
}

.event-detail-card .card-header h4 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.event-detail-card .card-body {
    padding: 10px 20px;
}

.event-detail-card .registration-number {
    font-family: monospace;
    background-color: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #6b7280;
}

.event-datetime {
    font-size: 1.1em;
    color: #fd1414;
    font-weight: 600;
}

.event-datetime i {
    color: #000000;
    margin-right: 4px;
}

.event-detail-card .badge.bg-warning {
    background-color: #f59e0b !important;
    color: white;
}

.event-detail-card p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.event-detail-card p strong {
    color: #495057;
    font-weight: 600;
}

.event-detail-card p i {
    color: #6b7280;
    width: 16px;
    margin-right: 8px;
}

.event-detail-card .mt-3 {
    margin-top: 1rem;
}

.event-detail-card .mt-4 {
    margin-top: 1.5rem;
}

.event-detail-card .pt-3 {
    padding-top: 1rem;
}

.event-detail-card .border-top {
    border-top: 1px solid #e1e5e9;
}

.event-detail-card .bg-light {
    background-color: #f8fafc !important;
}

.event-detail-card .rounded {
    border-radius: 6px;
}

.event-detail-card .p-3 {
    padding: 1rem;
}

.event-detail-card .text-muted {
    color: #6b7280 !important;
}

.event-detail-card .small {
    font-size: 0.875em;
}

/* ヘッダー */
.navbar {
    background-color: #fff;
    border-bottom: 1px solid #e1e5e9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 6px 1rem;
}

.navbar-brand {
    font-weight: 600;
    color: #2c3e50 !important;
    font-size: 28px;
}

/* ヘッダー内のサブタイトル */
.navbar-brand .subtitle {
    font-size: 16px;
    font-weight: normal;
    color: #6b7280;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

/* スマホでのヘッダー調整 */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 18px;
    }

    .navbar-brand .subtitle {
        font-size: 10px;
        margin-left: 2px;
    }
}

.navbar-nav .nav-link {
    color: #6c757d !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #2c3e50 !important;
}

/* メインコンテンツ */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

/* カードスタイル */
.card {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    margin-bottom: 20px;
}

.card-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e1e5e9;
    border-radius: 8px 8px 0 0 !important;
    padding: 10px;
    margin-bottom: 5px;
}

.card-header h2 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.card-body {
    padding: 5px 20px;
}

/* フォームスタイル */
.form-section {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #e1e5e9;
}

.form-section h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
}

.required {
    color: #e74c3c;
    font-weight: 600;
}

.form-control {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 14px;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.help-text {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* ボタンスタイル */
.btn {
    border-radius: 6px;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    border-color: #6b7280;
}

.btn-secondary:hover {
    background-color: #4b5563;
    border-color: #4b5563;
}

.btn-outline-secondary {
    color: #6b7280;
    border-color: #d1d5db;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    background-color: #f9fafb;
    color: #374151;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* チェックボックス */
.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}



/* アラート */
.alert {
    border-radius: 6px;
    border: 1px solid transparent;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

/* イベントリスト */
.event-card {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background-color: #fff;
    transition: box-shadow 0.2s ease;
    margin-bottom: 16px;
    overflow: hidden;
}

.event-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.event-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e1e5e9;
    padding: 12px 20px;
}

.event-header h5 {
    margin: 0 0 6px 0;
    color: #2c3e50;
    font-weight: 600;
}

.registration-number {
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}

.badge {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 12px;
}

.badge.bg-success {
    background-color: #10b981 !important;
}

.badge.bg-danger {
    background-color: #ef4444 !important;
}

.badge.bg-secondary {
    background-color: #6b7280 !important;
}

.badge.bg-warning {
    background-color: #f59e0b !important;
    color: #fff !important;
}

.event-body {
    padding: 16px 20px;
}

.event-meta {
    margin-bottom: 12px;
}

.event-meta p {
    margin: 0 0 6px 0;
    color: #6b7280;
    font-size: 14px;
}

.event-meta i {
    width: 16px;
    margin-right: 8px;
    color: #9ca3af;
}

.event-content {
    margin-bottom: 12px;
}

.event-content p {
    color: #374151;
    margin: 0;
    line-height: 1.6;
}



.event-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e1e5e9;
}

.event-footer .text-muted {
    font-size: 12px;
    color: #9ca3af;
}

/* タブ */
.nav-tabs {
    border-bottom: 1px solid #e1e5e9;
    margin-bottom: 24px;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 6px 6px 0 0;
    color: #6b7280;
    font-weight: 500;
    padding: 12px 16px;
    margin-right: 4px;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link.active {
    color: #3b82f6;
    background-color: #fff;
    border-bottom: 2px solid #3b82f6;
}

.nav-tabs .nav-link:hover {
    color: #374151;
    background-color: #f9fafb;
}

/* 空の状態 */
.text-center.py-5 {
    padding: 60px 20px;
}

.text-center.py-5 i {
    color: #d1d5db;
    margin-bottom: 16px;
}

.text-center.py-5 h4 {
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 8px;
}

.text-center.py-5 p {
    color: #9ca3af;
    margin-bottom: 20px;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .form-section {
        padding: 20px;
    }

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

    .event-meta .row {
        flex-direction: column;
    }

    .event-meta .col-md-6 {
        margin-bottom: 12px;
    }

    .event-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* スマホ用: イベントカードの高さをさらに低く */
    .event-card {
        margin-bottom: 12px;
    }

    .event-header {
        padding: 8px 16px;
    }

    .event-header h5 {
        margin: 0 0 4px 0;
        font-size: 1.1em;
    }

    .event-body {
        padding: 12px 16px;
    }

    .event-meta {
        margin-bottom: 8px;
    }

    .event-meta p {
        margin: 0 0 4px 0;
        font-size: 13px;
        line-height: 1.4;
    }

    .event-content {
        margin-bottom: 8px;
    }

    .event-content p {
        font-size: 13px;
        line-height: 1.4;
    }

    .event-datetime {
        font-size: 1.0em;
    }

    .registration-number {
        font-size: 12px;
        padding: 2px 4px;
    }

    .badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    /* スマホ用: イベント詳細画面の高さを小さく */
    .event-detail-card {
        margin-bottom: 10px;
        margin-top: 10px;
    }

    .event-detail-card .card-header {
        padding: 6px 12px;
        margin-bottom: 6px;
    }

    .event-detail-card .card-header h4 {
        font-size: 1.1em;
    }

    .event-detail-card .card-body {
        padding: 6px 12px;
    }

    .event-detail-card p {
        margin-bottom: 8px;
        line-height: 1.4;
        font-size: 13px;
    }

    .event-detail-card .mt-3 {
        margin-top: 0.5rem;
    }

    .event-detail-card .mt-4 {
        margin-top: 0.75rem;
    }

    .event-detail-card .pt-3 {
        padding-top: 0.5rem;
    }

    .event-detail-card .p-3 {
        padding: 0.5rem;
    }

    .event-datetime {
        font-size: 1.0em;
    }

    .event-detail-card .registration-number {
        font-size: 0.8em;
        padding: 2px 6px;
    }

    .event-detail-card .badge.bg-warning {
        font-size: 10px;
        padding: 2px 6px;
    }


}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ローディング */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* スクロールバー */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* フッター */
.footer {
    background-color: #343a40;
    color: white;
    padding: 5px 0;
    width: 100%;
    text-align: center;
    font-size: 14px;
}

.footer .container {
    max-width: 1000px;
    width: 100%;
    margin: auto;
}

.footer-text {
    margin: 2px 0;
    font-size: 14px;
    color: #bbb;
}

.footer-link {
    color: #bbb;
    text-decoration: none;
    font-size: 12px;
}

.footer-link:hover {
    text-decoration: underline;
}

.footer-link i {
    font-size: 14px;
    margin-right: 5px;
}

/* カスタム時間選択UI */
.custom-time-picker {
    display: none;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
    list-style: none;
}

.custom-time-picker.show {
    display: block;
}

.custom-time-picker .dropdown-item {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.custom-time-picker .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #333;
}

.custom-time-picker .dropdown-item:last-child {
    border-bottom: none;
}

/* ヘッダー下の隙間を詰める */
.navbar {
    margin-bottom: 8px;
}

/* イベント画面のコンテナ上部余白を詰める */
.container {
    padding-top: 0;
}

/* カードの上マージンも調整（必要なら） */
.card {
    margin-top: 0;
}

/* イベント用ページネーションの余白を小さくする */
.pagination {
    margin-bottom: 0.1rem !important;
    margin-top: 0.1rem !important;
}

.pagination .page-link {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
    line-height: 1.25 !important;
}

.pagination .page-item {
    margin: 0 1px !important;
}

/* ページネーション情報の余白も小さく */
.pagination+.text-center {
    margin-top: 0.1rem !important;
    margin-bottom: 0.1rem !important;
}

.pagination+.text-center small {
    font-size: 0.75rem !important;
}