/* ========================================
   Button Styles
   - Link buttons and overlay close buttons
   ======================================== */

/* Link button - designフォルダのボタンスタイルを参考 */
.link-button {
    --btn-height-min: 44px;
    --btn-height-max: 56px;
    --btn-height: clamp(var(--btn-height-min), 6vw, var(--btn-height-max));
    --btn-bg: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    background: var(--btn-bg);
    color: #fff;
    border: none;
    padding: 0 1.75rem;
    margin: 0.5rem auto;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    min-width: 220px;
    width: min(100%, 420px);
    height: var(--btn-height);
    min-height: var(--btn-height);
    max-height: var(--btn-height);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    line-height: 1.05;
    letter-spacing: 0.02em;
    font-size: clamp(0.95rem, 0.78rem + 0.35vw, 1.15rem);
    text-decoration: none;
}

.link-button i,
.link-button svg {
    font-size: 1em;
    line-height: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.link-button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    height: 100%;
    font-size: inherit;
    padding: 0 0.25rem;
}

.link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    text-decoration: none;
}

.link-button:active {
    transform: translateY(0);
}

/* section-container内のリンクボタン */
.section-container .link-button {
    display: block;
    width: 100%;
    max-width: 420px;
    margin: 0.5rem auto;
}

/* Main Menuセクション内のリンクボタン（2列レイアウト用） */
.two-colmuns-link-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    width: 100%;
    margin: 0.75rem 0;
    justify-items: center;
}

@media (min-width: 641px) {
    .two-colmuns-link-buttons {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}

/* ========================================
   Overlay Close Button Styles
   ======================================== */

.mode-overview-close-bottom {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.mode-overview-close-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.mode-overview-close-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.mode-overview-close-button:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .mode-overview-close-button {
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   Google Login Button Styles
   ======================================== */

.google-login-button {
    background: white;
    color: #1f2937;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.google-login-button:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.google-login-button:active {
    transform: translateY(0);
}

.google-login-button i {
    font-size: 1.2rem;
}

@media (max-width: 640px) {
    .google-login-button {
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   Irregular Three Buttons Styles
   - 詳細条件、詳細確認、初期化ボタン
   ======================================== */

.irregular-button1 button,
.irregular-button2 button,
.irregular-button3 button {
    width: 90%;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
    border-radius: 30px;
    color: #ffffff;
    font-size: clamp(1.15rem, 3vw, 1.35rem);
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    margin: 0 auto;
    box-sizing: border-box;
}

.irregular-button1 button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.irregular-button2 button {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.irregular-button3 button {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

.irregular-button1 button:hover,
.irregular-button2 button:hover,
.irregular-button3 button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.irregular-button1 button:active,
.irregular-button2 button:active,
.irregular-button3 button:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .irregular-button1 button,
    .irregular-button2 button,
    .irregular-button3 button {
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        font-size: 1rem;
        width: 90%; /* 明示的に設定 */
        max-width: 90%; /* 追加 */
    }
}

@media (min-width: 641px) and (max-width: 1263px) {
    .irregular-button-row--top .irregular-button1 button {
        width: 90%;
    }
    
    .irregular-button-row--bottom .irregular-button2 button,
    .irregular-button-row--bottom .irregular-button3 button {
        width: 100%; /* 親要素の44%幅に合わせる */
    }
}

/* three-buttons-horizontal 用の固定幅（親120pxに合わせる） */
.three-buttons-horizontal .irregular-button1 button,
.three-buttons-horizontal .irregular-button2 button,
.three-buttons-horizontal .irregular-button3 button {
    width: 100%;
    max-width: 100%;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

@media (max-width: 640px) {
    .three-buttons-horizontal .irregular-button1 button,
    .three-buttons-horizontal .irregular-button2 button,
    .three-buttons-horizontal .irregular-button3 button {
        font-size: 0.9rem;
    }
}

/* ========================================
   Two Buttons Horizontal Styles
   - 条件設定、初期化ボタン
   ======================================== */

.two-buttons-horizontal__button1 button,
.two-buttons-horizontal__button2 button {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
    border-radius: 30px;
    color: #ffffff;
    font-size: clamp(1.15rem, 3vw, 1.35rem);
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    margin: 0 auto;
    box-sizing: border-box;
}

.two-buttons-horizontal__button1 button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.two-buttons-horizontal__button2 button {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

.two-buttons-horizontal__button1 button:hover,
.two-buttons-horizontal__button2 button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.two-buttons-horizontal__button1 button:active,
.two-buttons-horizontal__button2 button:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .two-buttons-horizontal__button1 button,
    .two-buttons-horizontal__button2 button {
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        font-size: 1rem;
        width: 140px;
        min-width: 140px;
        max-width: 140px;
    }
}

@media (min-width: 641px) and (max-width: 1263px) {
    .two-buttons-horizontal__button1 button,
    .two-buttons-horizontal__button2 button {
        width: 150px;
        min-width: 150px;
        max-width: 150px;
    }
}

/* 無効化されたtwo-buttons-horizontal__buttonのスタイル */
.two-buttons-horizontal__button1 button.button-disabled,
.two-buttons-horizontal__button2 button.button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    box-shadow: 0 2px 8px rgba(156, 163, 175, 0.2);
}

.two-buttons-horizontal__button1 button.button-disabled:hover,
.two-buttons-horizontal__button2 button.button-disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(156, 163, 175, 0.2);
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.two-buttons-horizontal__button1 button.button-disabled:active,
.two-buttons-horizontal__button2 button.button-disabled:active {
    transform: none;
}

