/**
 * [uq_table] 専用スタイル。
 * レイアウト・配色とも Y!mobile 版(ym-table-full)に合わせている。
 * 接頭辞 uqt- で統一。他モジュール(udc- / uqs- / uq-f-)とは衝突しない。
 */

.uqt-container {
    margin: 2em 0;
    color: #333;
    line-height: 1.4;
}
.uqt-update-info { text-align: right; font-size: 11px; color: #888; margin-bottom: 5px; }

/* ---- 契約種別タブ ---- */
.uqt-container ul.uqt-tab-menu {
    display: flex !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: none !important;
}
.uqt-container ul.uqt-tab-menu li {
    width: 50% !important;
    padding: 12px 0 !important;
    margin: 0 -1px 0 0 !important;
    cursor: pointer;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-bottom: none;
    font-weight: bold;
    font-size: 14px;
    border-radius: 5px 5px 0 0;
    color: #666;
    text-align: center;
    box-sizing: border-box;
    list-style-type: none !important;
    text-indent: 0 !important;
    z-index: 1;
}
/* テーマ側が li に装飾を足してくることがあるので打ち消す */
.uqt-container ul.uqt-tab-menu li::before,
.uqt-container ul.uqt-tab-menu li::after {
    content: none !important;
    display: none !important;
}
.uqt-container ul.uqt-tab-menu li:last-child { margin-right: 0 !important; }
.uqt-container ul.uqt-tab-menu li.is-active {
    background: #4f7aca;
    color: #fff;
    border-color: #4f7aca;
    z-index: 2;
    position: relative;
}
.uqt-container ul.uqt-tab-menu li:focus-visible { outline: 2px solid #4f7aca; outline-offset: -2px; }

/* 契約種別が1つだけのとき、タブの代わりに出す見出し。見た目は選択中のタブに合わせる */
.uqt-single-label {
    background: #4f7aca;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    padding: 12px 0;
    border: 1px solid #4f7aca;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    box-sizing: border-box;
}

/* 非表示タブは max-height:0 で畳む(display:none にすると画像の遅延読込が効かない) */
.uqt-content-box { max-height: 0; overflow: hidden; visibility: hidden; border-top: 2px solid #4f7aca; }
.uqt-content-box.is-active { max-height: none; overflow: visible; visibility: visible; }

/* ---- 表本体 ---- */
.uqt-table-full {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #eee;
    table-layout: fixed;
    background: #fff;
    margin-bottom: 8px;
}
.uqt-table-full thead th {
    background: #4f7aca;
    color: #fff !important;
    padding: 15px 10px;
    font-weight: bold;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.3);
    font-size: 14px;
    cursor: pointer;
    position: relative;
    user-select: none;
}
.uqt-table-full thead th::after { content: ' ▼▲'; font-size: 10px; opacity: 0.7; }
.uqt-table-full th,
.uqt-table-full td { border: 1px solid #eee; vertical-align: middle; padding: 10px 8px; }

.uqt-td-model { width: 30%; text-align: left; }
.uqt-model-flex { display: flex; align-items: center; gap: 8px; }
.uqt-img-box { width: 75px; flex-shrink: 0; }
.uqt-img-box img { width: 100%; height: auto; display: block; aspect-ratio: 75 / 100; object-fit: contain; }
.uqt-name { font-weight: bold; font-size: 16px; color: inherit; line-height: 1.3; }
.uqt-date-text { display: block; font-size: 13px; color: #999; margin-top: 2px; text-align: left; font-weight: bold; }

.uqt-label-container { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.uqt-icon-label {
    display: inline-block;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.uqt-icon-label.is-blue { background: #4f7aca; }
.uqt-icon-label.is-gray { background: #888; }

/* ---- 価格まわり ---- */
.uqt-badge-base {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    min-width: 50px;
}
.uqt-badge-blue { background: #0076c0; }
.uqt-badge-gray { background: #999; }
.uqt-badge-red  { background: #d32f2f; }

.uqt-price-large {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #333;
}
.uqt-price-large.is-red { color: #d32f2f; }
.uqt-price-baseline-box { display: flex; align-items: baseline; justify-content: flex-end; }
.uqt-unit-small { font-size: 12px; font-weight: bold; margin-left: 3px; color: #333; }
.uqt-unit-small.is-red { color: #d32f2f; }

.uqt-td-price { width: 35%; background: #fafafa; }
.uqt-price-inner {
    font-size: 16px;
    color: #444;
    margin-bottom: 6px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 6px;
}
.uqt-p-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.uqt-p-row.is-discount { color: #d32f2f; font-weight: bold; }
.uqt-split-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    width: 100%;
}
.uqt-split-row:last-child { margin-bottom: 0; }
.uqt-monthly-note { font-size: 10px; color: #888; text-align: right; margin-top: -2px; }

/* ---- スマホトクするプログラム列 ---- */
.uqt-td-toku { width: 35%; padding: 10px 8px !important; }
.uqt-box-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 6px;
}
.uqt-box-layout:last-child { margin-bottom: 0; }
.uqt-red-box-full { background: #fff9f9; border: 1px solid #ffecec; }
.uqt-box-right-content { text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.uqt-toku-subinfo { margin-top: 8px; text-align: center; font-size: 0.8em; color: #666; line-height: 1.5; }
.uqt-toku-none { text-align: center; color: #999; font-size: 12px; margin: 30px 0; }

/* ---- 列強調(target属性に連動) ---- */
.uqt-col-highlight {
    border-left: 2px solid #d32f2f !important;
    border-right: 2px solid #d32f2f !important;
}
.uqt-table-full thead .uqt-col-highlight { border-top: 2px solid #d32f2f !important; }
.uqt-table-full tbody tr:last-child .uqt-col-highlight { border-bottom: 2px solid #d32f2f !important; }

.uqt-disclaimer {
    font-size: 0.75em;
    color: #666;
    margin-top: 8px;
    line-height: 1.6;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 8px 12px;
    text-align: left;
}

.uqt-empty { text-align: center; padding: 30px 20px; color: #666; background: #fdfdfd; border: 1px dashed #ccc; border-radius: 8px; font-weight: bold; }

/* ---- スマホ表示: 表をカード化 ---- */
@media screen and (max-width: 900px) {
    .uqt-table-full thead { position: absolute; visibility: hidden; height: 0; overflow: hidden; clip: rect(0,0,0,0); }
    .uqt-table-full tr { display: block; margin-bottom: 30px; border: 2px solid #eee; border-radius: 10px; overflow: hidden; }
    .uqt-table-full th,
    .uqt-table-full td { display: block; width: 100% !important; border: none; border-bottom: 1px solid #eee; }
    .uqt-model-flex { flex-direction: column; align-items: center; text-align: center; }
    .uqt-label-container { justify-content: center; }
    .uqt-name { font-size: 19px; }
    .uqt-date-text { text-align: center; }
    .uqt-split-row, .uqt-box-layout { padding: 10px 5px; }
    /* 縦並びでは列の枠線が意味を成さないので、強調は中身を囲む方式に切り替える */
    .uqt-col-highlight {
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        border-bottom: none !important;
    }
    .uqt-price-highlight-wrap,
    .uqt-toku-highlight-wrap { border: 2px solid #d32f2f; border-radius: 8px; padding: 5px; }
}
