@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Noto+Sans+JP:wght@400;500;700&display=swap');

#ltc-calendar-app {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    color: #333;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

#ltc-calendar-view {
    scroll-margin-top: 100px; /* スムーズスクロール時に固定ヘッダー等と重なるのを防ぐ */
}

/* Instruction */
.ltc-calendar-instruction {
    margin-bottom: 15px;
    color: #dc2626;
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.5;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 12px 20px;
    border-radius: 8px;
}

/* Header */
/* Header & Footer */
.ltc-calendar-header,
.ltc-calendar-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.ltc-calendar-header {
    margin-bottom: 20px;
}

.ltc-calendar-footer {
    margin-top: 20px;
}

.ltc-calendar-header h2 {
    margin: 0;
    font-weight: 700;
    color: #1e293b;
}

.ltc-btn {
    background: #f1f5f9;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #475569;
    transition: all 0.3s ease;
}

.ltc-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: translateY(-1px);
}

/* Grid */
.ltc-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.ltc-fday-header {
    text-align: center;
    font-weight: 700;
    padding: 10px 0;
    color: #64748b;
}

.ltc-fday {
    background: #fff;
    border-radius: 12px;
    min-height: 152px;
    padding: 12px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ltc-fday:not(.ltc-fday-disabled):not(.ltc-fday-full):hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: #cbd5e1;
}

.ltc-fday-disabled {
    background: #f8fafc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 休校日専用のスタイル */
.ltc-fday-closed {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    pointer-events: none;
}

.ltc-fday-closed .ltc-fday-num {
    color: #94a3b8 !important;
}

.ltc-fday-closed .ltc-fprice {
    color: #64748b !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
}

.ltc-fday-full {
    background: #e5e7eb;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.ltc-fday-num {
    font-weight: 700;
    font-size: 1.4rem;
    color: #334155;
    margin-bottom: auto;
}

.ltc-fday-info {
    text-align: right;
}

.ltc-fprice {
    color: #ef4444;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 5px;
    height: 1.5em;
}

.ltc-fgrad {
    color: #059669;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 3px;
    height: 1.5em;
}

.ltc-fcap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.ltc-badge {
    display: block;
    box-sizing: border-box;
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    width: 100%;
    text-align: left;
}

.ltc-badge-avail {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.ltc-badge-full {
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
}

.ltc-badge-full-text {
    color: #ef4444;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Modal */
.ltc-front-modal {
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.ltc-front-modal-content {
    background-color: #fff;
    width: 100%;
    max-width: 980px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    height: auto;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.ltc-animate-pop {
    animation: ltcPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes ltcPop {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.ltc-front-modal-header {
    background: #1e293b;
    color: #fff;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ltc-front-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.ltc-front-close {
    color: #cbd5e1;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.ltc-front-close:hover {
    color: #fff;
}

.ltc-front-modal-body {
    padding: 30px;
    overflow-y: auto;
}

.ltc-form-group {
    margin-top: 10px;
    margin-bottom: 10px;
}

.ltc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
}

.ltc-req {
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
}

.ltc-form-group input[type="text"],
.ltc-form-group input[type="email"],
.ltc-form-group input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.ltc-form-group input[type="text"]:focus,
.ltc-form-group input[type="email"]:focus,
.ltc-form-group input[type="tel"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ltc-radio-group,
.ltc-checkbox-group {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    margin-bottom: 16px;
}

.ltc-vertical {
    flex-direction: column;
    gap: 4px;
}

.ltc-radio-group label,
.ltc-checkbox-group label,
.entry-field label {
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-left: 6px;
}

.ltc-radio-group input[type="radio"],
input[type="radio"],
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
    margin: 0;
}

.ltc-radio-group input[type="radio"]:disabled+span,
.ltc-radio-group input[type="radio"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.ltc-submit-btn {
    width: 100%;
    background: #ef4444;
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 10px;
}

.ltc-submit-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.ltc-submit-btn:active {
    transform: translateY(0);
}

#ltc-form-message {
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
}

.ltc-success {
    color: #10b981;
    padding: 10px;
    background: #ecfdf5;
    border-radius: 8px;
}

.ltc-error {
    color: #ef4444;
    padding: 10px;
    background: #fef2f2;
    border-radius: 8px;
}

.ltc-loading {
    color: #3b82f6;
    padding: 10px;
}

/* Scroll Container & Utility */
.ltc-calendar-scroll-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ltc-sp-only {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .ltc-sp-only {
        display: inline !important;
    }

    .ltc-calendar-instruction {
        font-size: 1.1rem;
        /* さらに拡大 */
        padding: 12px 15px;
        margin-bottom: 12px;
    }

    .ltc-calendar-header,
    .ltc-calendar-footer {
        padding: 15px 10px;
        gap: 10px;
    }

    .ltc-calendar-header h2 {
        font-size: 1.5rem;
        /* さらに拡大 */
        text-align: center;
    }

    .ltc-btn {
        padding: 10px 12px;
        font-size: 1.1rem;
        /* さらに拡大 */
        white-space: nowrap;
    }

    .ltc-calendar-grid {
        gap: 5px;
        min-width: 850px;
    }

    .ltc-fday-header {
        font-size: 1.05rem;
    }

    .ltc-fday {
        min-height: 80px;
        padding: 8px;
    }

    .ltc-fday-num {
        font-size: 1.3rem;
        /* さらに拡大 */
    }

    .ltc-fprice {
        font-size: 1.2rem;
        /* さらに拡大 */
    }

    .ltc-fgrad {
        font-size: 1.05rem;
    }

    .ltc-badge {
        font-size: 0.95rem;
        /* さらに拡大 */
        padding: 4px 6px;
    }

    .ltc-front-modal-body {
        padding: 20px;
    }

    /* スマホ表示時の全体的なフォントサイズ拡大用スタイル */
    #ltc-calendar-app,
    .ltc-front-modal-body,
    .table-sp-style td {
        font-size: 1.15rem !important;
    }

    /* 項目名はより太く大きく、はっきりと表示 */
    .table-sp-style th {
        font-size: 1.25rem !important;
        font-weight: 700 !important;
    }

    /* 見出し（「お客さまについて」「確認事項」等）のフォントサイズ調整 */
    .ltc-front-modal-body h3.midashi03 {
        font-size: 1.35rem !important;
        margin-top: 30px !important;
        padding-bottom: 8px !important;
    }

    /* モーダルヘッダータイトルの調整 */
    .ltc-front-modal-header h3 {
        font-size: 1.35rem !important;
    }

    /* フォーム要素の拡大 */
    .entry-field input[type="text"],
    .entry-field input[type="email"],
    .entry-field input[type="tel"],
    .entry-field input[type="date"],
    .entry-field select,
    .entry-field textarea {
        font-size: 1.25rem !important;
        padding: 14px 12px !important;
        /* タップしやすく上下の余白を少し追加 */
        box-sizing: border-box !important;
        max-width: 100% !important;
    }

    .ltc-radio-group label,
    .ltc-checkbox-group label,
    .entry-field label {
        font-size: 1.2rem !important;
    }

    .ltc-radio-group input[type="radio"],
    .entry-field input[type="radio"],
    .entry-field input[type="checkbox"] {
        width: 24px !important;
        height: 24px !important;
    }

    .chuui,
    .fs80 {
        font-size: 1.05rem !important;
    }

    .ltc-submit-btn,
    button.ltc-front-close {
        font-size: 1.3rem !important;
        padding: 16px 20px !important;
    }

    /* スマホ表示時にテーブルの各項目を縦並びにするスタイル */
    .table-sp-style,
    .table-sp-style tbody,
    .table-sp-style tr {
        display: block !important;
        width: 100% !important;
    }

    .table-sp-style th,
    .table-sp-style td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .table-sp-style th {
        padding-top: 10px !important;
        padding-bottom: 4px !important;
        border-bottom: none !important;
    }

    .table-sp-style td {
        padding-top: 4px !important;
        padding-bottom: 12px !important;
        border-top: none !important;
    }

    /* 有効期限入力用カレンダーのスマホ幅調整 */
    .entry-field input[name="shojimen-expiry"] {
        width: 100% !important;
        max-width: 250px !important;
        box-sizing: border-box !important;
    }
}

/* Utility classes to override display in responsive layout */
.ltc-hidden,
.table-sp-style tr.ltc-hidden {
    display: none !important;
}

/* 有効期限入力用カレンダーの基本幅調整 */
.entry-field input[name="shojimen-expiry"] {
    width: 100%;
    max-width: 250px;
    box-sizing: border-box;
}