/* Social Auth Buttons
 * Provider-specific button styling for social login.
 * Base .auth-divider and .auth-social styles are in pc-kompas-user-api/assets/css/auth.css
 */

/* ========================================
   Social Button Base
   ======================================== */

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md, 8px);
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.4;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
    border: 1px solid;
}

.social-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.social-btn__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.social-btn__text {
    white-space: nowrap;
}

/* ========================================
   Google Button
   ======================================== */

.social-btn--google {
    background: var(--bg-primary, #fff);
    border-color: var(--border, #dadce0);
    color: var(--text-primary, #3c4043);
}

.social-btn--google:hover:not(:disabled) {
    background: var(--bg-hover, #f8f9fa);
    border-color: var(--border-light, #c4c7cc);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.social-btn--google:active:not(:disabled) {
    background: var(--bg-tertiary, #f1f3f4);
}

/* ========================================
   Facebook Button
   ======================================== */

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

.social-btn--facebook:hover:not(:disabled) {
    background: #166fe5;
    border-color: #166fe5;
    box-shadow: 0 1px 3px rgba(24, 119, 242, 0.3);
}

.social-btn--facebook:active:not(:disabled) {
    background: #1469d4;
    border-color: #1469d4;
}

.social-btn--facebook .social-btn__icon {
    fill: #ffffff;
}

/* ========================================
   Error Message
   ======================================== */

.pksa-error {
    margin-bottom: 12px;
}

/* ========================================
   Terms Text
   ======================================== */

.social-terms {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-muted, #70757a);
    text-align: center;
    line-height: 1.5;
}

.social-terms a {
    color: var(--accent, #4285f4);
    text-decoration: underline;
}

.social-terms a:hover {
    color: var(--accent-hover, #1a73e8);
}

/* ========================================
   Provider List (Profile Section)
   ======================================== */

.provider-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.provider-item {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 16px);
    padding: clamp(12px, 2vw, 16px);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-height: 64px;
    transition: border-color 0.2s;
}

.provider-item--linked {
    border-color: rgba(34, 197, 94, 0.2);
}

.provider-item__logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.provider-item__logo--google {
    background: #ffffff;
}

.provider-item__logo--facebook {
    background: #1877F2;
}

.provider-item__info {
    flex: 1;
    min-width: 0;
}

.provider-item__name {
    font-weight: 600;
    font-size: clamp(0.875rem, 1.5vw + 0.25rem, 0.9375rem);
    color: var(--text-primary);
}

.provider-item__email {
    font-size: clamp(0.75rem, 1vw + 0.25rem, 0.8125rem);
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.status-badge--linked {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge--unlinked {
    background: var(--bg-hover);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Button sizing for provider items */
.provider-item .btn-small {
    padding: 6px 14px;
    font-size: 0.8125rem;
    border-radius: 8px;
    white-space: nowrap;
}

.provider-item .btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.provider-item .btn-outline:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--border-light, var(--border));
}

.provider-item .btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile: stack actions below */
@media (max-width: 500px) {
    .provider-item {
        flex-wrap: wrap;
    }

    .provider-item .btn {
        width: 100%;
    }
}

/* ========================================
   Confirmation Modal (unlink, etc.)
   ======================================== */

.pksa-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 20px;
}

.pksa-confirm-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: clamp(24px, 4vw, 32px);
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    animation: pksa-modal-in 0.25s ease;
}

@keyframes pksa-modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.pksa-confirm-modal__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(var(--warning-rgb, 245, 158, 11), 0.1);
    border: 1px solid rgba(var(--warning-rgb, 245, 158, 11), 0.2);
    color: var(--warning, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(12px, 2vw, 16px);
}

.pksa-confirm-modal__title {
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.pksa-confirm-modal__desc {
    font-size: clamp(0.8125rem, 1vw + 0.25rem, 0.875rem);
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.pksa-confirm-modal__list {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 0 0 clamp(16px, 3vw, 24px);
}

.pksa-confirm-modal__list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: clamp(0.75rem, 1vw + 0.2rem, 0.8125rem);
    color: var(--text-secondary);
    padding: 6px 0;
    line-height: 1.4;
}

.pksa-confirm-modal__list li::before {
    content: '•';
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: 1px;
}

.pksa-confirm-modal__actions {
    display: flex;
    gap: 10px;
}

.pksa-confirm-modal__actions .btn {
    flex: 1;
    justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
    .pksa-confirm-modal {
        animation: none;
    }
}
