/**
 * ソーシャルログインボタン CSS
 *
 * Google、LINE、その他のソーシャルログインボタンの統一デザイン
 *
 * @package    CareNavi
 * @category   CSS
 * @version    1.0.0
 */

/* ===================================================
   ソーシャルログインセクション
   =================================================== */

.social-login-section {
    margin: 20px 0;
}

.social-login-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
}

.social-login-separator::before,
.social-login-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.social-login-separator:not(:empty)::before {
    margin-right: 15px;
}

.social-login-separator:not(:empty)::after {
    margin-left: 15px;
}

.social-login-separator span {
    color: #999;
    font-size: 14px;
    font-weight: 400;
}

/* ===================================================
   ソーシャルログインボタン共通スタイル
   =================================================== */

.btn-social-login {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-social-login:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-social-login:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-social-login:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.2);
}

/* アイコン部分 */
.btn-social-login .social-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* テキスト部分 */
.btn-social-login .social-text {
    flex: 1;
    text-align: center;
}

/* ローディング状態 */
.btn-social-login.loading {
    pointer-events: none;
    opacity: 0.6;
}

.btn-social-login.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spinner 0.6s linear infinite;
}

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

/* ===================================================
   Googleログインボタン
   =================================================== */

.btn-social-login.btn-google {
    background-color: #fff;
    border-color: #dadce0;
    color: #3c4043;
}

.btn-social-login.btn-google:hover {
    background-color: #f8f9fa;
    border-color: #dadce0;
    color: #3c4043;
}

.btn-social-login.btn-google:active {
    background-color: #f1f3f4;
}

/* Googleロゴ（4色） */
.btn-google .google-logo {
    width: 18px;
    height: 18px;
}

/* ===================================================
   LINEログインボタン
   =================================================== */

.btn-social-login.btn-line {
    background-color: #06C755;
    border-color: #06C755;
    color: #fff;
}

.btn-social-login.btn-line:hover {
    background-color: #05b34c;
    border-color: #05b34c;
    color: #fff;
}

.btn-social-login.btn-line:active {
    background-color: #04a043;
}

.btn-social-login.btn-line:focus {
    box-shadow: 0 0 0 3px rgba(6, 199, 85, 0.2);
}

/* LINEロゴ（白） */
.btn-line .line-logo {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* ===================================================
   Facebookログインボタン（将来対応用）
   =================================================== */

.btn-social-login.btn-facebook {
    background-color: #1877F2;
    border-color: #1877F2;
    color: #fff;
}

.btn-social-login.btn-facebook:hover {
    background-color: #166fe5;
    border-color: #166fe5;
    color: #fff;
}

.btn-social-login.btn-facebook:active {
    background-color: #1464d6;
}

.btn-social-login.btn-facebook:focus {
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.2);
}

/* ===================================================
   Twitterログインボタン（将来対応用）
   =================================================== */

.btn-social-login.btn-twitter {
    background-color: #1DA1F2;
    border-color: #1DA1F2;
    color: #fff;
}

.btn-social-login.btn-twitter:hover {
    background-color: #1a91da;
    border-color: #1a91da;
    color: #fff;
}

.btn-social-login.btn-twitter:active {
    background-color: #1781c2;
}

.btn-social-login.btn-twitter:focus {
    box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.2);
}

/* ===================================================
   レスポンシブ対応
   =================================================== */

/* タブレット（768px以下） */
@media (max-width: 768px) {
    .btn-social-login {
        padding: 11px 18px;
        font-size: 14px;
    }

    .btn-social-login .social-icon {
        width: 18px;
        height: 18px;
        margin-right: 10px;
    }

    .social-login-separator span {
        font-size: 13px;
    }
}

/* スマートフォン（480px以下） */
@media (max-width: 480px) {
    .social-login-section {
        margin: 15px 0;
    }

    .btn-social-login {
        padding: 10px 16px;
        font-size: 13px;
        margin-bottom: 10px;
    }

    .btn-social-login .social-icon {
        width: 16px;
        height: 16px;
        margin-right: 8px;
    }

    .social-login-separator {
        margin: 15px 0;
    }

    .social-login-separator span {
        font-size: 12px;
    }
}

/* ===================================================
   ダークモード対応（将来対応用）
   =================================================== */

@media (prefers-color-scheme: dark) {
    .btn-social-login.btn-google {
        background-color: #2d2d2d;
        border-color: #5f6368;
        color: #e8eaed;
    }

    .btn-social-login.btn-google:hover {
        background-color: #3c4043;
        border-color: #5f6368;
    }

    .social-login-separator::before,
    .social-login-separator::after {
        border-bottom-color: #5f6368;
    }

    .social-login-separator span {
        color: #9aa0a6;
    }
}

/* ===================================================
   アクセシビリティ対応
   =================================================== */

/* キーボードフォーカス時の視認性向上 */
.btn-social-login:focus-visible {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
    .btn-social-login {
        border-width: 2px;
    }

    .btn-social-login:focus {
        outline: 3px solid currentColor;
        outline-offset: 2px;
    }
}

/* 縮小モーション設定時のアニメーション無効化 */
@media (prefers-reduced-motion: reduce) {
    .btn-social-login {
        transition: none;
    }

    .btn-social-login.loading::after {
        animation: none;
    }
}

/* ===================================================
   ソーシャルログインボタングループ
   =================================================== */

.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 横並び配置（オプション） */
.social-login-buttons.horizontal {
    flex-direction: row;
    gap: 10px;
}

.social-login-buttons.horizontal .btn-social-login {
    flex: 1;
    margin-bottom: 0;
}

/* スマートフォンでは常に縦並び */
@media (max-width: 768px) {
    .social-login-buttons.horizontal {
        flex-direction: column;
        gap: 10px;
    }

    .social-login-buttons.horizontal .btn-social-login {
        width: 100%;
    }
}

/* ===================================================
   エラー状態
   =================================================== */

.btn-social-login.error {
    border-color: #dc3545;
    background-color: #f8d7da;
    color: #721c24;
}

.btn-social-login.error:hover {
    border-color: #bd2130;
    background-color: #f5c6cb;
}

/* ===================================================
   無効状態
   =================================================== */

.btn-social-login:disabled,
.btn-social-login.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===================================================
   ソーシャルログイン情報表示
   =================================================== */

.social-login-info {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    color: #6c757d;
    text-align: center;
}

.social-login-info a {
    color: #007bff;
    text-decoration: none;
}

.social-login-info a:hover {
    text-decoration: underline;
}
