/* src/public/css/text-counter.css */

/* 💡 整理：このファイルの先頭には、同じ内容のスタイル（.counter-zone 〜 .btn-clear-text）が
   もう一組そのまま重複して書かれていました。後ろ側の定義で上書きされて効いていない
   「読むだけ無駄な行」だったため削除しています。見た目は変わりません。 */


.counter-zone {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.input-side {
    flex: 2;
    min-width: 300px;
}
.result-side {
    flex: 1;
    min-width: 250px;
}

/* オプションパネル */
.options-panel {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}
.section-label {
    font-size: 1rem;
    color: #2a5298;
    border-left: 4px solid #2a5298;
    padding-left: 10px;
    margin-bottom: 15px;
    font-weight: bold;
}
.switches {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ツールバー */
.toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.btn-tool {
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    color: #475569;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-tool:hover { background: #e2e8f0; }
.btn-danger { color: #ef4444; border-color: #fca5a5; }
.btn-danger:hover { background: #fee2e2; }

/* テキスト入力エリア */
.text-area {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    line-height: 1.6;
    margin-bottom: 15px;
}
.text-area:focus { border-color: #3498db; }

/* アドオンエリア（置換・キーワード） */
.addon-area {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.addon-area h3 {
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 10px;
    margin-top: 0;
}
.addon-flex {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.addon-flex input[type="text"] {
    flex: 1;
    min-width: 120px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    outline: none;
}
.addon-flex input[type="text"]:focus {
    border-color: #2a5298;
}
.btn-action {
    padding: 9px 16px;
    background: #2a5298;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
}
.btn-action:hover { background: #1e3c72; }
.keyword-result {
    font-weight: bold;
    color: #2a5298;
    background: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    white-space: nowrap;
}

/* 結果表示カード */
.result-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}
.result-label { font-size: 0.95rem; font-weight: bold; color: #444; }
.result-value { font-size: 1.5rem; font-weight: bold; color: #2a5298; }

/* 💡 追加：blade の style 属性から移動した見た目の指定 */
.result-divider {
    border: 0;
    border-top: 1px dashed #e2e8f0;
    margin: 15px 0;
}
/* 「枚」「約」「分」など、数字に添える小さめの単位 */
.result-unit {
    font-size: 0.9rem;
}
.privacy-note {
    font-size: 0.85rem;
    color: #777;
    line-height: 1.6;
    margin-top: 20px;
}

/* トースト通知 */
.toast-area {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast-msg {
    background: rgba(30, 41, 59, 0.9);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.toast-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* 📱 スマホ・タブレット（iPad含む）レスポンシブ対応 */
@media (max-width: 768px) {
    .counter-zone { flex-direction: column; gap: 20px; }
    .input-side, .result-side { width: 100%; min-width: 100%; }
    .toolbar { flex-direction: column; gap: 8px; }
    .btn-tool { width: 100%; justify-content: center; padding: 12px; }
    .addon-flex { flex-direction: column; align-items: stretch; }
    .addon-flex span { text-align: center; }
}