/* ============================================================
   Social Login — frontend styles
   ============================================================ */

.sociallogin-wrapper {
    margin: 20px 0;
}

/* Divider */
.sociallogin-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #6c757d;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.sociallogin-divider::before,
.sociallogin-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid #dee2e6;
}

/* Button group */
.sociallogin-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Base button */
.sociallogin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid transparent;
    cursor: pointer;
}
.sociallogin-btn:hover {
    filter: brightness(0.93);
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    text-decoration: none;
}
.sociallogin-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Google */
.sociallogin-btn--google {
    background: #fff;
    border-color: #dadce0;
    color: #3c4043;
}

/* Facebook */
.sociallogin-btn--facebook {
    background: #1877F2;
    color: #fff;
}

/* X (Twitter) */
.sociallogin-btn--x {
    background: #000;
    color: #fff;
}

/* Error page */
.sociallogin-error-page {
    max-width: 480px;
    margin: 40px auto;
    text-align: center;
}
.sociallogin-error-page .alert {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}


/* ============================================================
   SVG size hard-reset — override any theme global svg rules
   ============================================================ */

#sociallogin-terms-page svg,
.sociallogin-wrapper svg {
    max-width: none !important;
    max-height: none !important;
    width: auto !important;
    height: auto !important;
}

/* Explicit sizes per context — must come after the reset */
.sl-modal__badge svg       { width: 18px !important; height: 18px !important; }
.sl-modal__icon svg        { width: 26px !important; height: 26px !important; }
.sl-terms-box__header svg  { width: 16px !important; height: 16px !important; }
.sl-terms-list li svg      { width: 14px !important; height: 14px !important; }
.sl-terms-link svg         { width: 12px !important; height: 12px !important; }
.sociallogin-btn svg       { width: 20px !important; height: 20px !important; }

/* ============================================================
   Social Login — Terms & Conditions Popup
   ============================================================ */

#sociallogin-terms-page {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Overlay */
.sl-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 99998;
}
.sl-overlay--in      { opacity: 1; }
.sl-overlay--leaving { opacity: 0; }

/* Modal card */
.sl-modal {
    position: relative;
    z-index: 99999;
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25), 0 4px 16px rgba(0,0,0,0.1);
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px) scale(0.97);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sl-modal--in      { opacity: 1; transform: translateY(0) scale(1); }
.sl-modal--leaving { opacity: 0; transform: translateY(16px) scale(0.97); }
.sl-modal--success { transform: scale(1.02); opacity: 0.8; }

/* Provider badge (top-right corner) */
.sl-modal__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.sl-modal__badge svg { width: 18px; height: 18px; }

/* Header */
.sl-modal__header {
    padding: 36px 32px 24px;
    background: linear-gradient(135deg, #1e265a 0%, #2d3a8c 100%);
    color: #fff;
    text-align: center;
}
.sl-modal__icon {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.sl-modal__icon svg { width: 26px; height: 26px; color: #fff; }
.sl-modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.sl-modal__subtitle {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0;
    line-height: 1.5;
}

/* Body */
.sl-modal__body {
    padding: 24px 32px;
}

/* Terms box */
.sl-terms-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.sl-terms-box__header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    color: #1e265a;
    margin-bottom: 12px;
}
.sl-terms-box__header svg { width: 16px; height: 16px; flex-shrink: 0; }

.sl-terms-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sl-terms-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.45;
}
.sl-terms-list li svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #22c55e;
}

.sl-terms-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #2d3a8c;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}
.sl-terms-link:hover { color: #1e265a; text-decoration: underline; }
.sl-terms-link svg { width: 12px; height: 12px; }

/* Checkbox */
.sl-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 16px;
}
.sl-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.sl-checkbox__box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.sl-checkbox input:checked ~ .sl-checkbox__box {
    background: #2d3a8c;
    border-color: #2d3a8c;
}
.sl-checkbox input:checked ~ .sl-checkbox__box::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
}
.sl-checkbox__label {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
}

/* Error message */
.sl-error-msg {
    font-size: 0.825rem;
    color: #dc2626;
    min-height: 18px;
    margin-bottom: 4px;
}

/* Footer */
.sl-modal__footer {
    padding: 0 32px 28px;
    display: flex;
    gap: 12px;
}

/* Buttons */
.sl-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.sl-btn--decline {
    background: #f1f5f9;
    color: #64748b;
    flex: 0 0 auto;
    padding: 12px 24px;
}
.sl-btn--decline:hover {
    background: #e2e8f0;
    color: #475569;
}
.sl-btn--accept {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
}
.sl-btn--accept.sl-btn--ready {
    background: linear-gradient(135deg, #2d3a8c, #1e265a);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(45, 58, 140, 0.4);
}
.sl-btn--accept.sl-btn--ready:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(45, 58, 140, 0.5);
}
.sl-btn--accept.sl-btn--loading .sl-btn__text { opacity: 0; }
.sl-btn--accept.sl-btn--loading .sl-btn__spinner { opacity: 1; }

.sl-btn__spinner {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sl-spin 0.7s linear infinite;
    opacity: 0;
}
@keyframes sl-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
    .sl-modal__header { padding: 28px 20px 20px; }
    .sl-modal__body   { padding: 20px 20px; }
    .sl-modal__footer { padding: 0 20px 24px; flex-direction: column-reverse; }
    .sl-btn--decline  { flex: 1; }
}
