﻿@charset "UTF-8";

/* =========================================
   基本レイアウト
   ========================================= */
.tools-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    max-width: 960px;
    margin: 20px auto 60px;
    flex-wrap: wrap;
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
}

/* =========================================
   共通パーツ（入力欄・プルダウン）
   ========================================= */
.input-group input,
.input-group select,
.preset-group select,
.preset-group input {
    width: 100%;
    height: 48px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
    box-sizing: border-box;
    vertical-align: middle;
    color: #333;
}

.input-group label,
.preset-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
}

.input-group,
.preset-group {
    margin-bottom: 15px;
}

/* =========================================
   左側：計算ツール
   ========================================= */
.calculator-container {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.calculator-container h1 {
    text-align: center;
    margin-top: 0 !important;
    margin-bottom: 25px;
    font-size: 22px;
    color: #333;
}

.optional-text {
    font-size: 12px;
    font-weight: normal;
    margin-left: 8px;
    color: #666;
}

/* 計算ボタン */
button {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
    background-color: #0F8951;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s;
}
button:hover {
    background-color: #0D7545;
}

/* 結果表示エリア */
#result {
    margin-top: 25px;
    padding: 20px;
    border: 1px solid #0F8951;
    border-radius: 4px;
    background-color: #f8f9fa;
    line-height: 1.6;
    font-size: 16px;
    text-align: center;
}

.error-label {
    color: #e60012; /* 鮮やかな赤 */
    font-weight: bold;
}

/* 計算結果更新時のアニメーション */
@keyframes fade-up {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.fade-anim {
    animation: fade-up 0.6s ease-out; 
}

/* =========================================
   右側：プリセットツール
   ========================================= */
.preset-container {
    flex: 0 0 320px;
    background-color: #f4f8fb;
    padding: 25px;
    border: 1px solid #cce5ff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.preset-container h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    color: #0056b3;
    border-bottom: 2px solid #dae1e9;
    padding-bottom: 10px;
}

.preset-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

/* 商品購入ボタン */
#btn-buy-product {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 50px;
    margin-top: 25px;
    margin-bottom: 15px;
    background-color: #ccc;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    pointer-events: none;
    transition: all 0.3s;
    font-size: 16px;
}

#btn-buy-product.active {
    background-color: #e60012;
    pointer-events: auto;
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}
#btn-buy-product.active:hover {
    background-color: #c4000f;
    transform: translateY(-2px);
}

.calc-trigger-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.calc-trigger-btn:hover {
    background-color: #0056b3;
}

/* 区切り線 */
.preset-line {
    border: none;
    border-top: 1px solid #dae1e9; 
    margin: 20px 0;
}

@media (max-width: 768px) {
    .calc-trigger-btn {
        padding: 15px;
        font-size: 18px;
    }
}

/* =========================================
   スマホ対応
   ========================================= */
@media (max-width: 768px) {
    .tools-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 30px;
    }
    .preset-container {
        flex: auto;
        width: 100%;
        order: -1;
    }
}