/**
 * g-page-v2 カレンダーページ用 CSS
 */

.calendar-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px;
    color: var(--gpv2-text, #222);
}

.calendar-page .page-header {
    margin: 0 0 16px;
}

.calendar-page .page-title {
    font-size: 1.6rem;
    margin: 0 0 8px;
}

.calendar-page .page-lead {
    font-size: 0.95rem;
    color: var(--gpv2-text-muted, #555);
    margin: 0;
}

/* ===============================
 *  タブ切替
 * =============================== */
.calendar-main-frame {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.toolbox-func {
    border-bottom: 1px solid #eee;
    margin-bottom: 16px;
}

.scroll-container-cal {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.scroll-container-cal::-webkit-scrollbar { height: 4px; }
.scroll-container-cal::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }

.button-wrapper {
    display: flex;
    gap: 6px;
    padding-bottom: 6px;
    white-space: nowrap;
}

.cal-tab-btn {
    flex: 0 0 auto;
    padding: 8px 14px;
    background: #f5f5f5;
    color: #555;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cal-tab-btn:hover {
    background: #e8e8e8;
}

.cal-tab-btn.active {
    background: #ec407a;
    color: #fff;
    border-color: #ec407a;
}

.content-container {
    display: none;
    animation: gpv2-fade-in 0.25s ease;
}

.content-container.active {
    display: block;
}

@keyframes gpv2-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===============================
 *  カレンダー本体
 * =============================== */
.calendar-container {
    text-align: center;
}

.calendar-header {
    font-size: 1.3rem;
    margin: 0 0 12px;
}

#next-prev-button {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

#next-prev-button button {
    padding: 6px 16px;
    background: #fafafa;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
}

#next-prev-button button:hover {
    background: #efefef;
}

#calendar {
    margin-top: 8px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-weekday {
    padding: 8px 0;
    background: #f5f5f5;
    font-size: 0.8rem;
    font-weight: bold;
    color: #555;
    border-radius: 4px;
}

.cal-sun { color: #d32f2f; }
.cal-sat { color: #1976d2; }

.cal-cell {
    padding: 12px 0;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #333;
}

.cal-cell.cal-other {
    color: #ccc;
    background: #fff;
}

.cal-cell.cal-today {
    background: #ec407a;
    color: #fff;
    font-weight: bold;
}

/* ===============================
 *  日の出・日の入り
 * =============================== */
.hinode-hinoiri-container h2 {
    font-size: 1.1rem;
    margin: 0 0 16px;
}

.hinode-hinoiri-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 480px;
    margin: 0 auto;
}

.hinode-card {
    padding: 24px 16px;
    border-radius: 12px;
    text-align: center;
}

.sunrise-card {
    background: linear-gradient(135deg, #0dc7f9, #fbc817);
}

.sunset-card {
    background: linear-gradient(135deg, #ff914d, #fbc817);
}

.hinode-icon {
    font-size: 3rem;
    line-height: 1;
}

.hinode-label {
    margin: 8px 0 4px;
    font-size: 0.9rem;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hinode-time {
    font-size: 1.5rem;
    color: #fff;
    font-weight: bold;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===============================
 *  六曜
 * =============================== */
.rokuyo-container h2 {
    font-size: 1.1rem;
    margin: 0 0 16px;
}

.rokuyo-item {
    background: #fafafa;
    border-left: 4px solid #ec407a;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.rokuyo-item h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    color: #333;
}

.rokuyo-item p {
    margin: 4px 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

/* ===============================
 *  西暦和暦対応表
 * =============================== */
.seireki-wareki-container h2 {
    font-size: 1.1rem;
    margin: 0 0 16px;
}

#seireki-wareki-table {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 6px;
}

table.seireki-wareki {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table.seireki-wareki thead {
    position: sticky;
    top: 0;
    background: #ec407a;
    color: #fff;
    z-index: 1;
}

table.seireki-wareki th,
table.seireki-wareki td {
    padding: 8px 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

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

table.seireki-wareki tbody tr:hover {
    background: #fff3e0;
}
