/**
 * Sali WP Login Frontend / Public Stylesheet
 */

/* Container wrapper styling */
.sali-google-login-container {
    margin: 20px 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Separation line for default WordPress login page */
.login .sali-google-login-separator {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    line-height: 0.1em;
    margin: 25px 0 15px;
    font-size: 13px;
    color: #777;
    font-weight: 500;
}
.login .sali-google-login-separator span {
    background: #fff;
    padding: 0 15px;
}

/* Standard Google Login Button Style */
.sali-google-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    padding: 10px 16px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    outline: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.12);
    position: relative;
}

.sali-google-login-btn:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

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

/* Button Icon */
.sali-google-login-btn .sali-google-icon {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.sali-google-login-btn .sali-google-icon svg {
    width: 100%;
    height: 100%;
}

/* Button Text */
.sali-google-login-btn .sali-google-text {
    flex-grow: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s;
}

/* Button Themes */
/* 1. Light Theme */
.sali-google-login-btn.theme-light {
    background-color: #ffffff;
    color: #3c4043;
    border-color: #dadce0;
}
.sali-google-login-btn.theme-light:hover {
    background-color: #f8f9fa;
    border-color: #d2d4d7;
}

/* 2. Dark Theme */
.sali-google-login-btn.theme-dark {
    background-color: #1a73e8;
    color: #ffffff;
    border-color: #1a73e8;
}
.sali-google-login-btn.theme-dark:hover {
    background-color: #155fa0;
    border-color: #155fa0;
}

/* 3. Custom Theme */
.sali-google-login-btn.theme-custom {
    background-color: var(--sali-btn-bg, #4285f4);
    color: var(--sali-btn-color, #ffffff);
    border-color: var(--sali-btn-border-color, #4285f4);
}
.sali-google-login-btn.theme-custom:hover {
    opacity: 0.9;
}

/* Shapes */
.sali-google-login-btn.shape-square {
    border-radius: 0;
}
.sali-google-login-btn.shape-rounded {
    border-radius: 4px;
}
.sali-google-login-btn.shape-pill {
    border-radius: 24px;
}

/* Alignments */
.sali-google-login-container.align-left {
    align-items: flex-start;
}
.sali-google-login-container.align-center {
    align-items: center;
}
.sali-google-login-container.align-right {
    align-items: flex-end;
}

/* Error message notice on wp-login.php */
.sali-google-error-notice {
    background-color: #fbe9e7;
    border-left: 4px solid #d32f2f;
    color: #c62828;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ==========================================================================
   Loading Spinner State
   ========================================================================== */
.sali-google-login-btn.sali-loading {
    pointer-events: none;
    opacity: 0.85;
    cursor: default;
}

.sali-google-login-btn.sali-loading .sali-google-icon,
.sali-google-login-btn.sali-loading .sali-google-text {
    opacity: 0.4;
}

.sali-google-login-btn::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: sali-spin 0.6s linear infinite;
    opacity: 0;
    transition: opacity 0.2s;
}

.sali-google-login-btn.sali-loading::after {
    opacity: 1;
}

@keyframes sali-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Custom Login/Register Form Widget
   ========================================================================== */
.sali-login-form-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.sali-login-form-wrapper h3 {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
}

.sali-form-field-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.sali-form-field-group label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.sali-form-field-group input[type="text"],
.sali-form-field-group input[type="email"],
.sali-form-field-group input[type="password"] {
    padding: 11px 14px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: all 0.2s ease;
    color: #0f172a;
}

.sali-form-field-group input[type="text"]:focus,
.sali-form-field-group input[type="email"]:focus,
.sali-form-field-group input[type="password"]:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.sali-form-utility-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
}

.sali-form-utility-row label.rememberme-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #475569;
}

.sali-form-utility-row label.rememberme-label input {
    margin-right: 6px;
    cursor: pointer;
}

.sali-form-utility-row a.lostpassword-link {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.sali-form-utility-row a.lostpassword-link:hover {
    text-decoration: underline;
}

.sali-form-submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background-color: #4f46e5;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.15);
    transition: all 0.2s ease;
}

.sali-form-submit-btn:hover {
    background-color: #4338ca;
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.25);
}

.sali-form-submit-btn:active {
    transform: translateY(0);
}

/* Inline Separation Line */
.sali-form-inline-separator {
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    line-height: 0.1em;
    margin: 25px 0 20px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.sali-form-inline-separator span {
    background: #fff;
    padding: 0 10px;
}

/* Notice alerts in Custom Form */
.sali-form-notice {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 18px;
    line-height: 1.4;
}
.sali-form-notice.notice-error {
    background-color: #fef2f2;
    border-left: 3px solid #ef4444;
    color: #b91c1c;
}
.sali-form-notice.notice-success {
    background-color: #f0fdf4;
    border-left: 3px solid #22c55e;
    color: #15803d;
}

/* Footer bottom switch register/login link */
.sali-form-switch-footer {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    color: #64748b;
}

.sali-form-switch-footer a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
}

.sali-form-switch-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   User Profile Social Section
   ========================================================================== */
.sali-profile-google-section {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    border: 1px solid #ccd0d4;
    max-width: 600px;
    margin-top: 10px;
}

.sali-profile-google-box {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sali-profile-google-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    background: #e2e8f0;
}

.sali-profile-google-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sali-profile-google-info h4 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #1d2327;
}

.sali-profile-google-info p {
    margin: 0 0 8px;
    font-size: 13px;
    color: #646970;
}

.sali-profile-google-btn-link,
.sali-profile-google-btn-unlink {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sali-profile-google-btn-link {
    background-color: #4285f4;
    color: #fff !important;
    border: 1px solid #4285f4;
}

.sali-profile-google-btn-link:hover {
    background-color: #357ae8;
}

.sali-profile-google-btn-unlink {
    background-color: #fff;
    color: #d32f2f !important;
    border: 1px solid #d32f2f;
}

.sali-profile-google-btn-unlink:hover {
    background-color: #fbe9e7;
}
