/*!
 * PMPro Enhanced Onboarding - Frontend Styles
 * Version: 1.0.0
 */

/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

.pmpro-enhanced-login-widget * {
    box-sizing: border-box;
}

/* ==========================================================================
   Login Widget Container
   ========================================================================== */

.pmpro-enhanced-login-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pmpro-enhanced-login-widget .pmpro-widget-title {
    margin: 0 0 20px 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* ==========================================================================
   Tab Navigation
   ========================================================================== */

.pmpro-login-tabs {
    margin-bottom: 20px;
}

.pmpro-tab-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e0e0e0;
}

.pmpro-tab-item {
    flex: 1;
    margin: 0;
    padding: 0;
}

.pmpro-tab-link {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    text-align: center;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.pmpro-tab-link:hover {
    color: #0073aa;
    background-color: #f8f9fa;
}

.pmpro-tab-item.active .pmpro-tab-link {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

/* ==========================================================================
   Tab Content
   ========================================================================== */

.pmpro-tab-panel {
    display: none;
}

.pmpro-tab-panel.active {
    display: block;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.pmpro-login-form,
.pmpro-register-form {
    margin-bottom: 20px;
}

.pmpro-form-field {
    margin-bottom: 16px;
}

.pmpro-form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.pmpro-form-field input[type="text"],
.pmpro-form-field input[type="email"],
.pmpro-form-field input[type="password"],
.pmpro-form-field input[type="url"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pmpro-form-field input[type="text"]:focus,
.pmpro-form-field input[type="email"]:focus,
.pmpro-form-field input[type="password"]:focus,
.pmpro-form-field input[type="url"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.pmpro-checkbox-field {
    display: flex;
    align-items: center;
}

.pmpro-checkbox-field label {
    display: flex;
    align-items: center;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.pmpro-checkbox-field input[type="checkbox"] {
    margin: 0 8px 0 0;
    width: auto;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */

.pmpro-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
    min-height: 44px;
}

.pmpro-btn-primary {
    background-color: #0073aa;
    color: #fff;
    width: 100%;
}

.pmpro-btn-primary:hover {
    background-color: #005a87;
    color: #fff;
}

.pmpro-btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.pmpro-btn-secondary:hover {
    background-color: #e6e6e6;
    color: #333;
}

.pmpro-btn-outline {
    background-color: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.pmpro-btn-outline:hover {
    background-color: #f8f9fa;
    color: #666;
}

.pmpro-submit-field {
    margin-top: 24px;
}

/* ==========================================================================
   Form Links
   ========================================================================== */

.pmpro-form-links {
    text-align: center;
    margin-top: 16px;
}

.pmpro-form-links a {
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
}

.pmpro-form-links a:hover {
    text-decoration: underline;
}

.pmpro-register-note {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin: 16px 0 0 0;
}

/* ==========================================================================
   OAuth Buttons
   ========================================================================== */

.pmpro-oauth-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.pmpro-oauth-title {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin: 0 0 16px 0;
    position: relative;
}

.pmpro-oauth-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e0e0e0;
    z-index: 1;
}

.pmpro-oauth-title span {
    background-color: #fff;
    padding: 0 12px;
    position: relative;
    z-index: 2;
}

.pmpro-oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pmpro-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-height: 44px;
    gap: 8px;
}

.pmpro-oauth-btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pmpro-google-btn {
    background-color: #fff;
    color: #333;
    border-color: #dadce0;
}

.pmpro-google-btn:hover {
    background-color: #f8f9fa;
    color: #333;
}

.pmpro-github-btn {
    background-color: #24292e;
    color: #fff;
    border-color: #24292e;
}

.pmpro-github-btn:hover {
    background-color: #1b1f23;
    color: #fff;
}

.pmpro-oauth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   User Dashboard
   ========================================================================== */

.pmpro-user-dashboard {
    text-align: center;
}

.pmpro-user-info {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    text-align: left;
}

.pmpro-user-avatar {
    margin-right: 12px;
}

.pmpro-user-avatar img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.pmpro-user-details h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.pmpro-user-email {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.pmpro-membership-status {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
}

.pmpro-membership-status p {
    margin: 0;
    font-size: 13px;
}

.pmpro-email-confirmation-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
}

.pmpro-warning {
    color: #856404;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.pmpro-warning a {
    color: #856404;
    text-decoration: underline;
}

.pmpro-user-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==========================================================================
   Messages and Notifications
   ========================================================================== */

.pmpro-messages {
    margin: 16px 0;
}

.pmpro-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.pmpro-message-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.pmpro-message-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.pmpro-message-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.pmpro-loading {
    position: relative;
    pointer-events: none;
}

.pmpro-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: pmpro-spin 1s linear infinite;
}

@keyframes pmpro-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Email Confirmation Status
   ========================================================================== */

.pmpro-email-confirmed {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}

.pmpro-email-unconfirmed {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}

.pmpro-email-unconfirmed a {
    color: #856404;
    text-decoration: underline;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .pmpro-enhanced-login-widget {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .pmpro-user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .pmpro-user-avatar {
        margin: 0 0 12px 0;
    }
    
    .pmpro-user-links {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .pmpro-enhanced-login-widget {
        padding: 16px;
    }
    
    .pmpro-form-field input[type="text"],
    .pmpro-form-field input[type="email"],
    .pmpro-form-field input[type="password"],
    .pmpro-form-field input[type="url"] {
        padding: 14px 16px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .pmpro-btn {
        padding: 14px 20px;
        font-size: 16px;
        min-height: 48px;
    }
    
    .pmpro-oauth-btn {
        padding: 14px 16px;
        font-size: 16px;
        min-height: 48px;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.pmpro-enhanced-login-widget :focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.pmpro-enhanced-login-widget .screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px !important;
    height: 1px !important;
    overflow: hidden;
}

/* ==========================================================================
   RTL Support
   ========================================================================== */

.rtl .pmpro-user-info {
    direction: rtl;
}

.rtl .pmpro-user-avatar {
    margin-right: 0;
    margin-left: 12px;
}

.rtl .pmpro-checkbox-field input[type="checkbox"] {
    margin: 0 0 0 8px;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .pmpro-enhanced-login-widget {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .pmpro-oauth-section {
        display: none;
    }
} 