/**
 * upgrade-auth-modal.css
 * upgrade.html認証モーダル専用スタイル
 * landing.cssのCSS変数に依存
 */

/* ===== オーバーレイ ===== */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ===== モーダル本体 ===== */
.auth-modal {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 24px 24px;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.auth-modal-overlay.active .auth-modal {
    transform: translateY(0);
}

/* ===== 閉じるボタン ===== */
.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

/* ===== タブ ===== */
.auth-modal-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-modal-tab {
    flex: 1;
    padding: 10px 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.auth-modal-tab.active {
    color: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--landing-accent, #60a5fa);
}

.auth-modal-tab:hover:not(.active) {
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Googleボタン ===== */
.auth-modal-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.auth-modal-google-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
}

.auth-modal-google-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-modal-google-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ===== 区切り線 ===== */
.auth-modal-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8125rem;
}

.auth-modal-divider::before,
.auth-modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* ===== フォーム共通 ===== */
.auth-modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-modal-field label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
}

.auth-modal-field input {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.2s;
}

.auth-modal-field input:focus {
    border-color: var(--landing-accent, #60a5fa);
}

.auth-modal-field input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* ===== 利用規約チェック ===== */
.auth-modal-terms {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.6);
}

.auth-modal-terms input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--landing-accent, #60a5fa);
}

.auth-modal-terms a {
    color: var(--landing-accent, #60a5fa);
    text-decoration: underline;
}

/* ===== エラー表示 ===== */
.auth-modal-error {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.auth-modal-error.visible {
    display: flex;
}

.auth-modal-error svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ===== 送信ボタン ===== */
.auth-modal-submit {
    width: 100%;
    padding: 12px;
    background: var(--landing-accent, #60a5fa);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-modal-submit:hover:not(:disabled) {
    opacity: 0.9;
}

.auth-modal-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== スピナー ===== */
@keyframes auth-modal-spin {
    to { transform: rotate(360deg); }
}

.auth-modal-spinner {
    width: 18px;
    height: 18px;
    animation: auth-modal-spin 1s linear infinite;
}

/* ===== パスワードリセットリンク ===== */
.auth-modal-forgot {
    text-align: center;
    margin-top: 4px;
}

.auth-modal-forgot a {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-modal-forgot a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== タブパネル ===== */
.auth-modal-panel {
    display: none;
}

.auth-modal-panel.active {
    display: block;
}
