/*
 * ahamo Device Checker
 * ルール:
 *   - color / background-color は指定しない（WordPressテーマに委ねる）
 *   - thead に背景色・ボーダーを付けない
 *   - h3 / h4 は使わない（span で見出しデザイン）
 *   - フィルターは縦並び
 *   - CLS 対策: min-height / table-layout: fixed
 */

/* -----------------------------------------------------------------------
   ラッパー
------------------------------------------------------------------------ */

.ahamo-dc-wrap {
    width: 100%;
    box-sizing: border-box;
}

/* -----------------------------------------------------------------------
   タブ
------------------------------------------------------------------------ */

.ahamo-dc-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5em;
    border-bottom: 2px solid #ff9b9b;
}

.ahamo-dc-tab-btn {
    flex: 1;
    padding: .55em 1.6em;
    border: none;
    border-bottom: none;
    background: #999;
    color: #fff;
    cursor: pointer;
    font-size: 1em;
    font-family: inherit;
    letter-spacing: .04em;
    min-height: 2.6em;
    border-radius: 4px 4px 0 0;
    transition: background .15s;
    text-align: center;
}

.ahamo-dc-tab-btn:not([aria-selected="true"]):hover {
    background: #888;
}

.ahamo-dc-tab-btn[aria-selected="true"] {
    font-weight: bold;
    background: #ff9b9b;
    color: #fff;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

/* -----------------------------------------------------------------------
   フィルター（縦並び）
------------------------------------------------------------------------ */

.ahamo-dc-filters {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .6em;
    padding: .75em 0 1em;
    margin-bottom: 1.25em;
    min-height: 6em; /* CLS 防止 */
}

.ahamo-dc-filter-label {
    display: flex;
    align-items: center;
    gap: .5em;
    font-size: .95em;
    /* ラベルテキスト幅を揃えてセレクトが綺麗に縦並びになるよう */
    min-width: fit-content;
}

/* ラベルテキスト部分を固定幅に */
.ahamo-dc-filter-label > span.ahamo-dc-filter-name {
    display: inline-block;
    min-width: 8em;
    font-weight: bold;
    letter-spacing: .02em;
}

.ahamo-dc-select {
    font-size: 1em;
    font-family: inherit;
    padding: .3em .5em;
    min-width: 14em;
    background: none;
}

.ahamo-dc-filter-check {
    gap: .4em;
    cursor: pointer;
}

.ahamo-dc-filter-check input[type="checkbox"] {
    width: 1em;
    height: 1em;
    cursor: pointer;
}

/* -----------------------------------------------------------------------
   結果エリア
------------------------------------------------------------------------ */

.ahamo-dc-result {
    min-height: 200px;
}

.ahamo-dc-loading {
    padding: 2.5em 0;
    text-align: center;
    letter-spacing: .05em;
}

/* -----------------------------------------------------------------------
   キャリア見出し（span で実装）
------------------------------------------------------------------------ */

.ahamo-dc-carrier-section {
    margin-bottom: 2.5em;
}

.ahamo-dc-carrier-heading {
    display: block;
    font-size: 1.05em;
    font-weight: bold;
    letter-spacing: .04em;
    padding: .4em 0 .4em .6em;
    margin: 0 0 .75em;
    border-left: 3px solid currentColor;
    line-height: 1.4;
}

/* -----------------------------------------------------------------------
   メーカー見出し（span で実装）
------------------------------------------------------------------------ */

.ahamo-dc-maker-heading {
    display: block;
    font-size: .95em;
    font-weight: bold;
    letter-spacing: .03em;
    margin: 1.2em 0 .35em;
    padding-bottom: .2em;
    border-bottom: 1px dashed currentColor;
    opacity: .85;
}

/* -----------------------------------------------------------------------
   端末リスト（箇条書き）
------------------------------------------------------------------------ */

.ahamo-dc-device-list {
    list-style: disc;
    margin: .3em 0 .75em 1.5em;
    padding: 0;
    font-size: .95em;
}

.ahamo-dc-device-list li {
    margin-bottom: .25em;
    line-height: 1.5;
}

.ahamo-dc-esim-badge {
    display: inline-block;
    font-size: .78em;
    padding: .1em .45em;
    margin-left: .4em;
    border: 1px solid currentColor;
    border-radius: 3px;
    vertical-align: middle;
    line-height: 1;
    opacity: .7;
}

/* -----------------------------------------------------------------------
   注釈
------------------------------------------------------------------------ */

.ahamo-dc-captions {
    list-style: none;
    margin: 1em 0 0;
    padding: 0;
    font-size: .88em;
    opacity: .85;
}

.ahamo-dc-captions li {
    margin-bottom: .35em;
    line-height: 1.5;
}

.ahamo-dc-caption-id {
    margin-right: .35em;
    font-weight: bold;
}

/* -----------------------------------------------------------------------
   0件・エラー
------------------------------------------------------------------------ */

.ahamo-dc-no-result,
.ahamo-dc-error {
    padding: 1.25em 0;
    font-size: .95em;
    letter-spacing: .02em;
}

.ahamo-dc-error a {
    text-decoration: underline;
}

/* -----------------------------------------------------------------------
   レスポンシブ（480px 以下）
------------------------------------------------------------------------ */

@media (max-width: 480px) {
    .ahamo-dc-tab-btn {
        padding: .45em 1em;
        font-size: .9em;
        letter-spacing: 0;
    }

    .ahamo-dc-select {
        min-width: 100%;
        width: 100%;
    }

    .ahamo-dc-filter-label {
        flex-direction: column;
        align-items: flex-start;
        gap: .25em;
    }

    .ahamo-dc-filter-label > span.ahamo-dc-filter-name {
        min-width: unset;
    }
}
