/* =========================================
   IIJmio Simulator CSS (Ver 90.4 Final)
   Fix: Selected Description Color & Layout
   ========================================= */

.iijmio-sim-wrapper {
    background: #ffffff;
    border-radius: 20px;
    padding: 35px;
    max-width: 640px;
    margin: 30px auto;
    font-family: 'Poppins', 'Noto Sans JP', "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    box-sizing: border-box;
    color: #333;
    line-height: 1.6;
    min-height: 450px;
}
.iijmio-sim-wrapper * { box-sizing: border-box; }

/* タイトル */
.sim-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 5px solid #ff008c;
    display: inline-block;
    width: 100%;
    color: #1a1a2e;
}

.sim-radio-btn input, .sim-radio-btn-long input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.sim-step { margin-top: 13px; margin-bottom: 45px; }

.sim-label {
    display: flex;
    align-items: center;
    margin-bottom: 22px;
    font-weight: 800;
    color: #333;
    font-size: 1.25rem;
}
.q-badge {
    background: #ff008c;
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    padding: 3px 15px;
    border-radius: 50px;
    margin-right: 18px;
    box-shadow: none; 
    letter-spacing: 0.05em;
}

/* Q0 */
.current-cost-input-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff5fa;
    padding: 22px;
    border-radius: 18px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 0, 140, 0.08);
    flex-wrap: wrap; 
}
#current-cost {
    flex: 1;
    min-width: 160px;
    padding: 14px;
    font-size: 1.5rem;
    border: 2px solid #ddd;
    border-radius: 12px;
    text-align: right;
    font-weight: 800;
    color: #ff008c;
    outline: none;
    background: #fff;
    transition: all 0.3s ease;
}
#start-sim-btn {
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 16px 35px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    box-shadow: none; 
}
#start-sim-btn:hover { background: #ff008c; transform: translateY(-4px); }

/* Q1-Q3 */
.sim-radio-group { display: flex; flex-wrap: wrap; gap: 15px; }
.sim-radio-btn { position: relative; cursor: pointer; flex: 1 1 auto; min-width: 150px; }
.btn-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    border: 2px solid #e5e5e5;
    border-radius: 18px;
    font-weight: 800;
    background: #fff;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: center;
}
.sim-radio-btn:hover .btn-text {
    border-color: #ffb3db;
    background: #fffbfd;
    transform: translateY(-4px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.sim-radio-btn input:checked + .btn-text {
    background: #ff008c;
    border-color: #ff008c;
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 0, 140, 0.3);
    transform: translateY(-4px);
}

/* Q4 特化レイアウト */
.data-capa-group { display: grid; grid-template-columns: 1fr; gap: 12px; }
.data-capa-group .btn-text {
    padding: 0; 
    min-height: auto;
    display: flex;
    flex-direction: row; 
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
}
.cap-main-info {
    background: #f2f4f6;
    width: 130px; 
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    border-right: 1px solid #eee;
    transition: 0.3s;
}
.cap-main-info .label-txt {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
    color: #333;
}
.cap-main-info .price-txt {
    font-size: 0.9rem;
    font-weight: 700;
    color: #666;
}
.cap-desc {
    flex: 1;
    padding: 15px 20px;
    display: flex;
    align-items: center; 
    justify-content: flex-start; 
    font-size: 0.90rem;
    line-height: 1.5;
    font-weight: 700;
    color: #333;
    text-align: left;
    transition: 0.3s;
}

/* ★修正：選択時のカラー指定。解説文（cap-desc）を白くする★ */
.sim-radio-btn input:checked + .btn-text {
    border-color: #ff008c;
    background: #ff008c; /* 背景をピンクに */
}
.sim-radio-btn input:checked + .btn-text .cap-main-info {
    background: #ff008c;
    border-right-color: rgba(255, 255, 255, 0.3);
}
.sim-radio-btn input:checked + .btn-text .label-txt,
.sim-radio-btn input:checked + .btn-text .price-txt,
.sim-radio-btn input:checked + .btn-text .cap-desc {
    color: #ffffff !important; /* 文字色を強制的に白へ */
}

/* Q5 通話定額 */
.sim-radio-group-vertical { display: flex; flex-direction: column; gap: 15px; }
.btn-text-long {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 35px;
    border: 2px solid #e5e5e5;
    border-radius: 18px;
    font-weight: 800;
    background: #fff;
    transition: all 0.3s ease;
}
.opt-price { 
    color: #ff008c; 
    font-size: 1.35rem; 
    font-weight: 800; 
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.opt-price::before {
    content: "月額";
    font-size: 0.7em;
    font-weight: 700;
    margin-right: 6px;
}

.sim-radio-btn-long input:checked + .btn-text-long {
    background: #ff008c;
    border-color: #ff008c;
    color: #fff;
    box-shadow: none;
    transform: none; 
}
.sim-radio-btn-long input:checked + .btn-text-long .opt-price { color: #fff !important; }

/* 結果表示エリア */
.sim-result-container { margin-top: 40px; overflow: hidden; }
.saving-banner {
    background: linear-gradient(135deg, #ff008c 0%, #e6007e 100%);
    color: #fff;
    text-align: center;
    padding: 15px 15px; /* 修正：padding縮小 */
    border-radius: 25px;
    margin-bottom: 30px;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.saving-main { 
    font-size: 2.8rem; 
    font-weight: 800; 
    line-height: 1.1; 
    text-shadow: 0 3px 6px rgba(0,0,0,0.15); 
}
.saving-sub { font-size: 1.25rem; font-weight: 800; display: block; opacity: 0.98; }

.result-header {
    background: #1a1a2e;
    color: #fff;
    font-weight: 800;
    padding: 25px 0;
    text-align: center;
    border-radius: 18px;
    margin-bottom: 30px;
    font-size: 1.35rem;
    letter-spacing: 0.15em;
    box-shadow: none;
}

.selected-plan-box {
    background: #f8f9fa;
    padding: 22px 15px;
    text-align: center;
    border-radius: 22px 22px 0 0;
    margin-bottom: 0;
    border: 1px solid #eee;
    border-bottom: 1px solid #e0e0e0; 
    box-shadow: inset 0 3px 15px rgba(0,0,0,0.03);
    position: relative;
    z-index: 2;
}
.plan-name-text { 
    font-size: 1.55rem;
    font-weight: 800; 
    color: #111; 
    letter-spacing: -0.04em; 
}

.price-breakdown {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 30px;
    padding: 30px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid #f2f2f2;
    box-shadow: 0 5px 20px rgba(0,0,0,0.04);
}
.breakdown-item { 
    display: flex; 
    justify-content: space-between; 
    font-size: 1.05rem; 
    padding: 4px 0;
    color: #444; 
    border-bottom: 1.5px solid #f8f8f8; 
    font-weight: 700; 
}
.breakdown-item:last-child { border-bottom: none; }

.sim-price-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    border: 1px solid #f0f0f0;
    border-top: none; 
    border-radius: 0 0 22px 22px;
    margin-bottom: 25px;
    background: #fff;
    transition: 0.35s ease;
    position: relative;
    z-index: 1;
}
.campaign-row { background: #fffbfd; border: 3px solid #ffb3db; box-shadow: 0 10px 30px rgba(255, 0, 140, 0.08); }

/* 金額表示の強制底辺揃え */
.sim-price-part {
    display: flex !important;
    align-items: baseline !important; 
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important; 
    width: 100% !important;
    margin: 0 auto !important;
}

.sim-price-part span {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    vertical-align: baseline !important;
    line-height: 1 !important;
}

.price-label-text,
.price-unit-text {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #333 !important;
    transform: translateY(-2px); 
}

.price-num-large { 
    font-family: 'Poppins', sans-serif !important;
    font-size: 4.2rem !important; 
    font-weight: 800 !important; 
    color: #e60033 !important; 
    letter-spacing: -0.06em !important; 
    line-height: 0.8 !important; 
    height: auto !important;
    transform: none !important;
}

.price-num-medium { 
    font-family: 'Poppins', sans-serif !important;
    font-size: 3rem !important; 
    font-weight: 700 !important; 
    color: #555 !important; 
    line-height: 0.8 !important;
}

.apply-button {
    display: inline-block;
    background: linear-gradient(135deg, #ff008c 0%, #e6007e 100%);
    color: #fff;
    font-size: 1.30rem;
    font-weight: 800;
    padding: 26px 70px;
    border-radius: 120px;
    text-decoration: none;
    box-shadow: none;
    transition: 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    max-width: 550px;
    text-align: center;
}
.apply-button:hover { transform: scale(1.05); }

.sim-note { font-size: 0.9rem; color: #aaa; text-align: right; padding: 15px; font-weight: 700; }

/* スマホ最適化 */
@media (max-width: 480px) {
    .iijmio-sim-wrapper { padding: 25px 15px; }
    .current-cost-input-wrap { padding: 18px; }
    #current-cost { font-size: 1.3rem; width: 100%; }
    #start-sim-btn { width: 100%; margin-top: 12px; padding: 20px; font-size: 1.2rem; }
    .btn-text { padding: 20px 12px; }
    
    .cap-main-info { width: 100px; padding: 15px 5px; }
    .cap-main-info .label-txt { font-size: 1.3rem; }
    .cap-desc { font-size: 0.8rem; padding: 10px 15px; }
    
    .saving-main { font-size: 2.2rem; }
    .price-num-large { font-size: 3.2rem !important; }
    .price-label-text, .price-unit-text { font-size: 1.1rem !important; }
    .apply-button { font-size: 1.4rem; padding: 22px; }
}