/* ===== アンケートモーダル survey.css ===== */
/* オーバーレイ */
#survey-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 18, 30, 0.62);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
    padding: 16px;
    box-sizing: border-box;
}
#survey-overlay.survey-shown {
    opacity: 1;
    pointer-events: auto;
}
#survey-overlay.survey-hidden {
    display: none;
}

/* ダイアログ */
.survey-dialog {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    width: 420px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px 28px 26px;
    position: relative;
    box-sizing: border-box;
    /* リアルタイムサイズ変化演出 */
    transition:
        width 0.7s cubic-bezier(.23, 1.05, .32, 1),
        max-width 0.7s cubic-bezier(.23, 1.05, .32, 1),
        max-height 0.7s ease,
        padding 0.45s ease,
        transform 0.45s ease,
        opacity 0.45s ease;
    transform: scale(0.85) translateY(10px);
    opacity: 0;
}
#survey-overlay.survey-shown .survey-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}
.survey-dialog.stage-form-active {
    width: 760px;
    max-width: 96vw;
}
.survey-dialog.stage-thanks-active {
    width: 480px;
    text-align: center;
}

/* ステージ切り替え */
.survey-stage {
    display: none;
}
.survey-stage.active {
    display: block;
    animation: survey-fadein 0.5s ease;
}
@keyframes survey-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 閉じるボタン(右上×) */
.survey-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}
.survey-close:hover {
    color: #222;
    background: #f0f0f0;
}

/* 見出し */
.survey-dialog h3 {
    margin: 0 0 18px 0;
    font-size: 1.28rem;
    color: #1a3658;
    font-family: 'Noto Serif JP', serif;
    border-bottom: 2px solid #c9a45a;
    padding-bottom: 10px;
    line-height: 1.4;
}

/* 案内テキスト */
.survey-lead {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
    margin: 0 0 22px 0;
}

/* 質問ブロック */
.survey-q {
    margin-bottom: 16px;
    padding: 14px 14px 10px;
    background: #f8f6f0;
    border-left: 3px solid #c9a45a;
    border-radius: 4px;
}
.survey-q .q-title {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #1a3658;
    font-size: 0.95rem;
    line-height: 1.5;
}
.survey-q .multi-note {
    font-weight: normal;
    color: #888;
    font-size: 0.82rem;
    margin-left: 4px;
}
.survey-q label {
    display: block;
    margin: 5px 0;
    font-size: 0.92rem;
    line-height: 1.55;
    cursor: pointer;
}
.survey-q label:not(.q-title):hover {
    color: #1a3658;
}
.survey-q input[type="checkbox"],
.survey-q input[type="radio"] {
    margin-right: 6px;
    transform: translateY(1px);
}
.survey-q input[type="text"],
.survey-q textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 9px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.92rem;
    font-family: inherit;
    margin-top: 4px;
}
.survey-q textarea {
    resize: vertical;
    min-height: 80px;
}
.survey-other {
    display: inline-block !important;
    width: auto !important;
    min-width: 160px;
    margin-left: 6px !important;
    margin-top: 0 !important;
    padding: 3px 8px !important;
    font-size: 0.88rem !important;
}

/* ボタンエリア */
.survey-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    justify-content: center;
}
.survey-actions-sub {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 14px;
    justify-content: center;
    border-top: 1px solid #eee;
    padding-top: 12px;
}

.survey-btn {
    padding: 11px 26px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.96rem;
    font-weight: 600;
    font-family: inherit;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.survey-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18);
}
.survey-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.survey-btn-primary {
    background: linear-gradient(135deg, #d0a85e 0%, #a98439 100%);
    color: #fff;
}
.survey-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #d8b06a 0%, #b58e3f 100%);
}
.survey-btn-ghost {
    background: #ececec;
    color: #333;
}
.survey-btn-ghost:hover:not(:disabled) {
    background: #ddd;
}
.survey-btn-text {
    background: none;
    border: none;
    color: #2a4670;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.86rem;
    font-family: inherit;
    padding: 4px 8px;
}
.survey-btn-text:hover {
    color: #c9a45a;
}

/* 完了画面 */
.stage-thanks p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
    margin: 8px 0;
}
.stage-thanks .survey-org {
    color: #1a3658;
    font-weight: bold;
    margin-top: 16px;
    font-size: 1rem;
}
.stage-thanks .survey-autoclose {
    color: #888;
    font-size: 0.85rem;
    margin-top: 18px;
}
#survey-countdown {
    display: inline-block;
    min-width: 1.2em;
    color: #c9a45a;
    font-weight: bold;
    font-size: 1.05rem;
}

/* 部屋番号ラベル */
.survey-room-label {
    font-size: 0.86rem;
    color: #1a3658;
    margin: -8px 0 16px 0;
    background: #f0f4f8;
    padding: 6px 10px;
    border-radius: 4px;
    display: inline-block;
}
.survey-room-label:empty {
    display: none;
}

/* スマホ */
@media (max-width: 600px) {
    .survey-dialog,
    .survey-dialog.stage-form-active,
    .survey-dialog.stage-thanks-active {
        width: 96vw;
        max-width: 96vw;
        padding: 22px 16px 18px;
    }
    .survey-dialog h3 { font-size: 1.1rem; }
    .survey-q { padding: 12px 10px 8px; }
    .survey-q label { font-size: 0.88rem; }
    .survey-actions { flex-direction: column; }
    .survey-actions .survey-btn { width: 100%; }
    .survey-other {
        display: block !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-top: 6px !important;
    }
}
