/* ==========================================================================
 * GW SSO — ソーシャルログインボタン & ニックネームモーダル
 * ========================================================================== */

/* ----- ボタンコンテナ ----- */
.gw-sso-buttons {
    margin: 20px 0 10px;
    padding-bottom: 20px;
    text-align: center;
}

/* ----- 「または」区切り線 ----- */
.gw-sso-divider {
    display: flex;
    align-items: center;
    margin: 18px 0 16px;
    color: #999;
    font-size: 13px;
}
.gw-sso-divider::before,
.gw-sso-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}
.gw-sso-divider span {
    padding: 0 14px;
    white-space: nowrap;
}

/* ----- 共通ボタン ----- */
.gw-sso-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin: 10px auto;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    line-height: 1.4;
}
.gw-sso-btn:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ----- SSO アイコン ----- */
.gw-sso-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* ----- Google ボタン ----- */
.gw-sso-btn--google {
    background: #fff;
    color: #3c4043;
    border-color: #dadce0;
}
.gw-sso-btn--google:hover {
    background: #f7f8f8;
    color: #3c4043;
}

/* ----- LINE ボタン ----- */
.gw-sso-btn--line {
    background: #06C755;
    color: #fff;
    border-color: #06C755;
}
.gw-sso-btn--line:hover {
    background: #05b34c;
    color: #fff;
}

/* ==========================================================================
 * ニックネーム設定モーダル
 * ========================================================================== */

.gw-sso-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.gw-sso-modal {
    background: #fff;
    border-radius: 14px;
    padding: 32px 28px 28px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    text-align: center;
    animation: gw-sso-fadeIn 0.25s ease;
}

@keyframes gw-sso-fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gw-sso-modal h2 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
}

.gw-sso-modal p {
    margin: 0 0 18px;
    font-size: 13px;
    color: #777;
    line-height: 1.6;
}

.gw-sso-modal input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}
.gw-sso-modal input[type="text"]:focus {
    border-color: #8e44ad;
    box-shadow: 0 0 0 2px rgba(142, 68, 173, 0.15);
}

/* ----- 利用規約 iframe 表示 ----- */
.gw-sso-modal--wide {
    max-width: 90vw;
    width: 600px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

#gw-sso-terms-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.gw-sso-terms-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

.gw-sso-terms-back-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: background 0.2s;
}
.gw-sso-terms-back-btn:hover {
    background: #f5f5f5;
}

.gw-sso-terms-iframe {
    flex: 1;
    width: 100%;
    border: 1px solid #eee;
    border-radius: 8px;
    min-height: 0;
}

/* ----- 利用規約チェック ----- */
.gw-sso-terms {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 16px 0 4px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    justify-content: center;
}
.gw-sso-terms input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}
.gw-sso-terms a {
    color: #8e44ad;
    text-decoration: underline;
}

/* ----- 保存ボタン ----- */
.gw-sso-btn--save {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 13px 16px;
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}
.gw-sso-btn--save:hover {
    opacity: 0.9;
    box-shadow: 0 2px 8px rgba(142, 68, 173, 0.3);
}
.gw-sso-btn--save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
 * wp-login.php 用の上書き
 * ========================================================================== */

#gw-sso-wp-login {
    clear: both;
}

#gw-sso-wp-login .gw-sso-buttons {
    margin-top: 0;
    padding-bottom: 0;
}

#gw-sso-wp-login .gw-sso-divider {
    margin-top: 0;
    padding-top: 24px;
}

#gw-sso-wp-login .gw-sso-btn {
    max-width: 100%;
}

/* ==========================================================================
 * UM フォーム内での位置調整
 * ========================================================================== */

.um-form .gw-sso-buttons {
    margin-top: 10px;
}

.um-form .gw-sso-btn {
    max-width: 100%;
}
