/**
 * components.css
 * アプリケーション全体で再利用されるUIコンポーネントのスタイルを定義
 * - ボタン
 * - 入力欄
 * - トースト通知
 */

/* ボタン */
.btn {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: var(--btn-primary-bg);
    color: var(--btn-text-color);
    border: none;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--btn-primary-hover);
}

.btn-secondary {
    background-color: var(--btn-secondary-bg);
    margin-top: 40px;
}

.btn-secondary:hover {
    background-color: var(--btn-secondary-hover);
}

/* 複数のモジュールで使われる、回答ボタンなどを横並びにする共通レイアウト */
.answer-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* テキスト入力欄の隣にあるカラーピッカーの微調整 */
.color-picker-input {
    width: 40px;
    height: 40px;
    border: none;
    padding: 0;
    border-radius: 8px;
    background-color: transparent;
    cursor: pointer;
}

/* テキスト入力 */
.text-input {
    padding: 10px;
    font-size: 16px;
    width: 100px;
    text-align: center;
    border: 2px solid var(--btn-secondary-bg);
    border-radius: 8px;
    background-color: var(--app-bg);
    color: var(--text-color);
    transition: all 0.3s;
}

/* トースト通知 */
#toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 15px 25px;
    color: var(--btn-text-color);
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 4px 8px var(--toast-shadow-color);
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.5s cubic-bezier(.25, .8, .25, 1);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background-color: var(--color-success);
}

.toast.error {
    background-color: var(--color-error);
}

/* 汎用ユーティリティ */
.hidden {
    display: none !important;
}