@charset "UTF-8";

/* --- 共通変数 --- */
:root {
    --valid-background-color: #EF91A766;
    --defintive-background-color: #EF91A7; /* メインのピンク */
    --disabled-background-color: #eee;
    --disabled-font-color: #aaa;
    --teal-color: #3BBFBE; /* ボタン色 */
    --input-bg-color: #F5F8FA;
    --light-pink-bg: #fff0f3; /* 追加: テーブルヘッダー用の薄いピンク */
}

/* =================================================
   強力なリセットとベーススタイルの定義 (px固定版)
   ================================================= */

/* プラグイン全体を囲うコンテナ */
#reserve-plugin-form {
    font-size: 16px !important;
    line-height: 1.6 !important;
    font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif !important;
    color: #333 !important;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

/* 全要素のリセット */
#reserve-plugin-form *,
#reserve-plugin-form *::before,
#reserve-plugin-form *::after {
    box-sizing: border-box !important;
    font-family: inherit !important;
}

/* --- カレンダー周り --- */
#reserve-plugin-form #rp-calendar-wrapper {
    position: relative;
    margin-bottom: 16px;
}

#reserve-plugin-form #scheduleHead {
    color: black;
    border-bottom: 1px solid #eee;
    padding-bottom: 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* カレンダーヘッダーの日付範囲テキスト */
#reserve-plugin-form #scheduleHead > span {
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    
    text-align: center !important;
    font-weight: bold !important;
    line-height: 1.4 !important;
    font-size: clamp(14px, 4vw, 24px) !important; 
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 10px !important;
}

#reserve-plugin-form .changeWeekButton {
    background: none;
    color: black;
    font-size: 24px !important;
    border: none;
    cursor: pointer;
    padding: 0 10px;
    margin: 0;
}

#reserve-plugin-form .changeWeekButton:disabled {
    color: lightgray;
    cursor: default;
}

/* グリッドレイアウト */
#reserve-plugin-form #shiftArea {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

#reserve-plugin-form .dateDisp {
    color: black;
    text-align: center;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px !important;
    line-height: 1.3;
}

#reserve-plugin-form .zoneDisp {
    padding: 12px 0 !important;
    background-color: white;
    border: 1px solid var(--defintive-background-color);
    color: var(--defintive-background-color);
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    font-size: 13px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    margin: 0 !important;
    line-height: 1.2;
    flex-direction: column;
}

#reserve-plugin-form .zoneDisp:hover {
    background-color: var(--defintive-background-color);
    color: white;
}

#reserve-plugin-form .zoneDisp:has(input:checked) {
    background-color: var(--defintive-background-color);
    color: white;
}

#reserve-plugin-form .zoneDisp.disabled {
    background: var(--disabled-background-color);
    color: var(--disabled-font-color);
    border: 1px solid #ddd;
    pointer-events: none;
}

#reserve-plugin-form .zoneDisp input[type="radio"] {
    display: none;
}

/* ローディング */
#reserve-plugin-form #rp-calendar-wrapper.loading::after {
    content: "読み込み中...";
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.8); font-weight: bold;
    z-index: 10;
    color: #333;
    font-size: 16px;
}

/* --- 入力フォーム周り --- */
#reserve-plugin-form .rp-form-field {
    margin-bottom: 24px !important;
    padding: 0 !important;
}

#reserve-plugin-form .itemHeader {
    padding: 0 0 8px 0 !important;
    font-weight: 700;
    font-size: 16px !important;
    margin-top: 8px;
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
    line-height: 1.4;
}

#reserve-plugin-form .itemHeader.required > span::after {
    border: 1px solid #FF3E3E;
    border-radius: 3px;
    content: "必須";
    font-size: 12px !important;
    font-weight: 400;
    color: #FF3E3E;
    padding: 2px 4px;
    margin-left: 8px;
    display: inline-block;
    line-height: 1;
}

/* 入力欄 */
#reserve-plugin-form .inputItem {
    color: black !important;
    width: 100% !important;
    border: 1px solid #DEDEDE !important;
    border-radius: 3px !important;
    font-size: 16px !important;
    padding: 12px 16px !important;
    background: var(--input-bg-color) !important;
    margin-top: 5px !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    appearance: none;
    height: auto !important;
    min-height: 48px !important;
    line-height: 1.5 !important;
}

#reserve-plugin-form .inputItem:focus {
    outline: 1px solid var(--defintive-background-color) !important;
    background-color: white !important;
}

#reserve-plugin-form textarea.inputItem {
    min-height: 120px !important;
}

/* ラジオ・チェックボックス */
#reserve-plugin-form .radio-group label, 
#reserve-plugin-form #checkArea label {
    background: var(--input-bg-color);
    color: black;
    padding: 16px 24px !important;
    margin: 8px 8px 0 0 !important;
    display: inline-block !important;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
    line-height: 1.2;
    font-size: 16px !important;
    transition: background-color 0.2s;
    width: auto !important;
}

#reserve-plugin-form .radio-group label:has(input:checked), 
#reserve-plugin-form #checkArea label:has(input:checked) {
    background-color: var(--defintive-background-color);
    color: white;
}

#reserve-plugin-form .radio-group input, 
#reserve-plugin-form #checkArea input {
    display: none;
}

/* チェックマーク装飾 */
#reserve-plugin-form .custom-check {
    position: relative;
    padding-left: 36px;
    display: inline-block;
    vertical-align: middle;
}

#reserve-plugin-form .custom-check::after {
    position: absolute;
    content: "";
    width: 20px;
    height: 20px;
    border: 1px solid #999;
    background-color: transparent;
    left: 0;
    top: 50%;
    margin-top: -10px;
    border-radius: 50%;
    box-sizing: border-box;
}

#reserve-plugin-form input[type="checkbox"] + .custom-check::after {
    border-radius: 4px; 
}

#reserve-plugin-form input:checked + .custom-check::before {
    position: absolute;
    content: "";
    width: 20px;
    height: 20px;
    background-color: var(--teal-color);
    border: 4px solid #fff;
    left: 0;
    top: 50%;
    margin-top: -10px;
    z-index: 1;
    border-radius: 50%;
    box-sizing: border-box;
    animation: popIn 0.2s forwards;
}

#reserve-plugin-form input[type="checkbox"]:checked + .custom-check::before {
    border-radius: 4px;
}

#reserve-plugin-form input:checked + .custom-check::after {
    border-color: transparent;
}

#reserve-plugin-form input:checked ~ .custom-check {
    font-weight: bold;
}

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* --- 同意エリア --- */
#reserve-plugin-form #checkArea {
    text-align: center !important;
    margin-top: 32px !important;
    padding: 24px !important;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #eee;
}

#reserve-plugin-form #checkArea a {
    color: var(--defintive-background-color);
    text-decoration: none;
    border-bottom: 1px solid var(--defintive-background-color);
    box-shadow: none;
}

/* --- ボタンエリア --- */
#reserve-plugin-form #buttonArea {
    width: 100%;
    text-align: center !important;
    margin-top: 32px !important;
    margin-bottom: 32px !important;
    display: block !important;
    clear: both;
}

#reserve-plugin-form #rp-confirm-button, 
#reserve-plugin-form #rp-submit-button {
    background: var(--teal-color) !important;
    color: #fff !important;
    border-radius: 100px !important;
    font-size: 18px !important;
    padding: 20px 40px !important;
    width: 300px !important;
    max-width: 100% !important;
    border: none !important;
    font-weight: bold !important;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    transition: opacity 0.2s;
    
    display: inline-block !important;
    margin: 0 auto !important;
    float: none !important;
    text-decoration: none !important;
    line-height: 1.2 !important;
    appearance: none;
    -webkit-appearance: none;
}

#reserve-plugin-form #rp-confirm-button:hover, 
#reserve-plugin-form #rp-submit-button:hover {
    opacity: 0.9;
}

/* 戻るボタン */
#reserve-plugin-form .returnButton {
    background: none !important;
    border: none !important;
    color: blue !important;
    cursor: pointer;
    font-size: 16px !important;
    padding: 10px;
    display: inline-block;
}

/* --- 【修正】確認画面テーブル（ピンク基調・清潔感のあるデザイン） --- */
#reserve-plugin-form table {
    width: 100%;
    border-collapse: separate !important; /* 角丸のためにseparate */
    border-spacing: 0 !important;
    margin-top: 20px;
    
    /* 外枠をメインカラーのピンクに */
    border: 2px solid var(--defintive-background-color) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background-color: #fff;
}

#reserve-plugin-form th, 
#reserve-plugin-form td {
    padding: 16px !important;
    text-align: left;
    font-size: 16px !important;
    vertical-align: middle !important;
}

#reserve-plugin-form th {
    width: 30%;
    /* 薄いピンク背景、濃いピンク文字で優しさと視認性を両立 */
    background: var(--light-pink-bg) !important;
    color: var(--defintive-background-color) !important;
    font-weight: bold !important;
    
    /* 下線は白にしてスッキリさせる */
    border-bottom: 1px solid #fff !important;
    border-right: 1px solid #fff !important;
    border-left: none !important;
}

#reserve-plugin-form td {
    background: #fff !important;
    color: #333 !important;
    border-bottom: 1px solid #eee !important;
}

/* 最後の行の下線は消す */
#reserve-plugin-form tr:last-child th,
#reserve-plugin-form tr:last-child td {
    border-bottom: none !important;
}

/* 黒いグラデーション時代の「：」を削除 */
#reserve-plugin-form th::before {
    content: none !important;
}


/* --- サンクスページ用スタイル --- */
#rp-thanks-wrapper {
    max-width: 600px;
    margin: 40px auto;
    text-align: center;
    color: #333;
    font-family: "Noto Sans JP", sans-serif;
}
.rp-thanks-box {
    padding: 40px 20px;
    border: 2px solid var(--defintive-background-color);
    border-radius: 10px;
    background-color: #fff;
}
.rp-thanks-box h2 {
    color: var(--defintive-background-color);
    margin-bottom: 20px;
}
.rp-id-display {
    background: var(--light-pink-bg);
    display: inline-block;
    padding: 10px 30px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--defintive-background-color);
    margin: 20px 0;
    border-radius: 50px;
}
.rp-btn-top {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 30px;
    background: #999;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-size: 14px;
    transition: opacity 0.2s;
}
.rp-btn-top:hover {
    opacity: 0.8;
}