/* === 共通要素 === */
:root {
    /* 全体テーマカラー */
    --mdc-theme-primary: #117766;
    --mdc-theme-secondary: #4CAF50;
    --mdc-theme-on-primary: #ffffff;
    --mdc-theme-surface: #ffffff;
    --mdc-theme-background: #ffffff;
}

/* -------------------------
   ラベル (floating label)
-------------------------- */
.mdc-floating-label,
.mdc-floating-label--float-above {
    color: #117766 !important;
}

/* -------------------------
   テキストフィールド
-------------------------- */
.mdc-notched-outline__leading,
.mdc-notched-outline__trailing,
.mdc-notched-outline__notch,
.mdc-text-field--focused .mdc-notched-outline__leading,
.mdc-text-field--focused .mdc-notched-outline__notch,
.mdc-text-field--focused .mdc-notched-outline__trailing {
    border-color: #117766 !important;
}

.mdc-text-field--focused .mdc-line-ripple {
    background-color: #117766 !important;
}

.mdc-text-field input {
    caret-color: #117766;
}

/* -------------------------
   チェックボックス・ラジオボタン
-------------------------- */
.mdc-checkbox__background,
.mdc-radio__outer-circle,
.mdc-radio__inner-circle,
.mdc-checkbox--selected .mdc-checkbox__background,
.mdc-radio--selected .mdc-radio__outer-circle,
.mdc-radio--selected .mdc-radio__inner-circle {
    border-color: #117766 !important;
    background-color: #117766 !important;
}

/* -------------------------
   ボタン（共通）
-------------------------- */
.mdc-button {
    color: #117766;
    border: none; /* 二重線防止 */
    background: transparent;
}

.mdc-button:hover,
.mdc-button:focus {
    background-color: rgba(76, 175, 80, 0.08);
}

/* 塗りつぶしボタン */
.mdc-button--raised {
    background-color: #117766;
    color: #ffffff;
    border: none;
}

.mdc-button--raised:hover,
.mdc-button--raised:focus {
    background-color: rgba(76, 175, 80, 0.08);
}

/* アウトラインボタン（公式推奨構成） */
.mdc-button--outlined {
    border-color: #117766;
    color: #117766;
}

.mdc-button--outlined:hover,
.mdc-button--outlined:focus {
    border-color: #388E3C;
}

/* リップルエフェクト */
.mdc-button::before,
.mdc-button::after {
    background-color: #4CAF50;
}





body {
    font-family: Arial, sans-serif;
    text-align: center;
    padding: 8px;
    background-color: #f5f5f5;
}

.page-title {
    text-align: center;
    margin: 32px 0;
    word-break: keep-all;
    overflow-wrap: break-word;
    white-space: normal;
}

#build-number {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 12px;
    color: rgba(var(--mdc-theme-on-surface-rgb, 0, 0, 0), 0.5);
}

/* === ローディングスピナー === */

#loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
}

#progress-spinner {
    width: 80px !important;
    height: 80px !important;
}

#loading p {
    margin-top: 16px;
    font-size: 16px;
    color: #555;
}

/* === アニメーション === */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.device-card {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}


/* === ボタン系 === */

.mdc-button {
    height: 36px;
}

.push-button.mdc-button {
    background-color: #117766 !important;
    color: white !important;
    padding: 10px !important;
    border-radius: 5px !important;
    font-weight: bold !important;
    width: 100% !important;
    border: none !important;
    margin: 4px 0 !important;
    text-transform: none;
}

.push-button.mdc-button::before,
.push-button.mdc-button::after {
    background-color: transparent !important;
}

.push-button.mdc-button:hover {
    background-color: #0e5e55 !important;
}

/* === メニュー関連 === */

#menu-button {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: white;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 24px;
}

.mdc-drawer {
    top: 0;
    height: 100vh;
}

.mdc-drawer__content {
    padding-top: 52px;
}

.mdc-drawer .mdc-list-item {
    font-size: 18px;
    padding: 8px;
}

.mdc-drawer .mdc-list-item__text {
    line-height: 1.2;
}

/* === メディアクエリ === */

@media (max-width: 600px) {
    .mdc-drawer .mdc-list-item {
        font-size: 20px;
        padding-left: 20px;
        padding-top: 18px;
    }
}

@media (min-width: 768px) {
    .mdc-list-item__text {
        padding-left: 16px;
    }
}

/* === テキストフィールド === */

.mdc-text-field {
    width: 100%;
    margin-bottom: 16px;
}

.mdc-text-field--with-trailing-icon .mdc-text-field__icon {
    right: 8px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666666;
    z-index: 2;
}

.custom-spinner {
    width: 64px;
    height: 64px;
    border: 8px solid #e0e0e0;
    border-top: 8px solid #117766;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ハンバーガーメニュー */
.mdc-icon-button,
.material-icons {
    background-color: #f5f5f5 !important;
}
.mdc-drawer {
    background-color: #f5f5f5;
}
