/* ==========================================================================
   料金シミュレーター・モーダル & フローティングボタン 専用スタイル
   ========================================================================== */

/* 起動ボタン（画面右下に固定 - 横長ボタン） */
.floating-sim-btn {
    position: fixed;
    bottom: 30px;
    right: 20px;
    padding: 0 25px;
    height: 65px;
    background: linear-gradient(135deg, #ff9800 0%, #f44336 100%);
    color: white !important;
    border-radius: 50px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(244, 67, 54, 0.5);
    z-index: 9999;
    border: 3px solid white;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none !important;
    animation: sim-btn-pulse 2s infinite;
}

@keyframes sim-btn-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7); }
    70% { transform: scale(1.03); box-shadow: 0 0 0 15px rgba(244, 67, 54, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); }
}

.floating-sim-btn:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 0 15px 40px rgba(244, 67, 54, 0.7);
    animation: none;
}

.floating-sim-btn i {
    font-size: 24px;
    color: white;
}

.floating-sim-btn span {
    font-size: 18px;
    font-weight: 900;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    letter-spacing: 0.05em;
    color: white;
    white-space: nowrap;
}

/* モーダルオーバーレイ */
.sim-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sim-modal-overlay.show {
    display: flex;
    opacity: 1;
}

/* モーダル本体 */
.sim-modal-container {
    width: 95%;
    max-width: 450px;
    background: #ffffff;
    border-radius: 40px;
    padding: 20px;
    box-shadow: 0 15px 0 #333;
    border: 4px solid #333;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-sizing: border-box;
}

.sim-modal-overlay.show .sim-modal-container {
    transform: translateY(0);
}

.sim-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 45px;
    height: 45px;
    background: #333;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    border: 3px solid white;
    z-index: 10001;
}

/* シミュレーター内部デザイン */
.sim-modal-container h1 {
    font-size: 20px;
    text-align: center;
    margin: 0 0 12px 0;
    color: #ff9800;
    text-shadow: 1px 1px 0 #333;
    border: none;
}

.sim-input-card {
    background: #f0f7ff;
    border-radius: 20px;
    padding: 10px;
    margin-bottom: 10px;
    border: 3px solid #333;
}

.sim-section-title {
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #333;
}

.sim-btn-group {
    display: flex;
    gap: 8px;
}

.sim-btn {
    flex: 1;
    padding: 8px 5px;
    border: 3px solid #333;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    background: white;
    box-shadow: 0 4px 0 #333;
    transition: all 0.1s;
    color: #333;
}

.sim-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #333;
}

.sim-btn.active { background: #ff9800; color: white; }
.sim-btn.active.blue { background: #2196f3; color: white; }
.sim-btn.active.orange { background: #ff9800; color: white; }

.sim-km-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.sim-km-display {
    font-size: 32px;
    color: #2196f3;
    font-weight: 900;
}

.sim-slider {
    width: 100%;
    height: 15px;
    background: #ddd;
    border-radius: 10px;
    border: 2px solid #333;
    -webkit-appearance: none;
}

.sim-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 30px;
    height: 30px;
    background: #2196f3;
    border: 3px solid #333;
    border-radius: 50%;
    cursor: pointer;
}

.sim-result-area {
    background: #fff0e0;
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    border: 4px solid #333;
    margin-top: 10px;
}

.sim-price {
    font-size: 32px;
    font-weight: 900;
    color: #f44336;
    display: block;
}

.sim-tax-text {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}


/* 認定証テーブル */
.main-certificate-table {
    margin-bottom: 30px;
    background: #fff;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.official-cert-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
}

.official-cert-table th, 
.official-cert-table td {
    border: 1px solid #ccc;
    padding: 12px 15px;
    text-align: left;
}

.official-cert-table th {
    background-color: #f8f9fa;
    width: 35%;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

.official-cert-table td {
    background-color: #fff;
    font-weight: 500;
}

@media screen and (max-width: 480px) {
    .official-cert-table { font-size: 13px; }
    .official-cert-table th { width: 40%; padding: 8px 10px; }
    .official-cert-table td { padding: 8px 10px; }
    .main-certificate-table { padding: 10px; }
}

@media screen and (max-width: 480px) {
    .floating-sim-btn { 
        padding: 0 15px;
        height: 55px;
        bottom: 20px; 
        right: 15px; 
    }
    .floating-sim-btn i { font-size: 20px; }
    .floating-sim-btn span { font-size: 15px; }
    .sim-modal-container { padding: 15px; }
}
