/* Barar WP Login Register - Frontend Styles */

.barar-form-wrapper {
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin: 20px auto;
    padding: 30px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.barar-form-wrapper *,
.barar-form-wrapper *::before,
.barar-form-wrapper *::after {
    box-sizing: border-box;
}

.barar-form {
    margin: 0;
}

.barar-field-group {
    margin-bottom: 18px;
}

.barar-field-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.barar-required {
    color: #dc3232;
    margin-left: 2px;
}

.barar-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background: #fff;
    border: 1px solid #dcd7ca;
    border-radius: 4px;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    outline: none;
}

.barar-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.barar-input.error {
    border-color: #dc3232;
    box-shadow: 0 0 0 1px #dc3232;
}

.barar-input.success {
    border-color: #46b450;
    box-shadow: 0 0 0 1px #46b450;
}

.barar-password-wrapper {
    position: relative;
}

.barar-password-wrapper .barar-input {
    padding-right: 44px;
}

.barar-toggle-password {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.barar-toggle-password:hover {
    color: #333;
}

.barar-toggle-password:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
    border-radius: 2px;
}

.barar-remember-group {
    display: flex;
    align-items: center;
}

.barar-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 400 !important;
    cursor: pointer;
}

.barar-checkbox-label input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.barar-button {
    width: 100%;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #fff;
    background: #2271b1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease-in-out, transform 0.1s ease-in-out;
    text-align: center;
}

.barar-button:hover {
    background: #135e96;
}

.barar-button:active {
    transform: scale(0.98);
}

.barar-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.barar-button .barar-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: barar-spin 0.6s linear infinite;
    margin: 0 auto;
}

.barar-button.loading .barar-spinner {
    display: block;
}

.barar-button.loading .barar-button-text {
    display: none;
}

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

.barar-form-message {
    padding: 10px 14px;
    margin-bottom: 18px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    display: none;
}

.barar-form-message.error {
    display: block;
    background: #fbeaea;
    color: #a00;
    border: 1px solid #f5c6cb;
}

.barar-form-message.success {
    display: block;
    background: #ecf7ed;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.barar-form-footer {
    margin-top: 16px;
    text-align: center;
}

.barar-forgot-password {
    font-size: 13px;
    color: #2271b1;
    text-decoration: none;
}

.barar-forgot-password:hover {
    text-decoration: underline;
}

.barar-password-strength {
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.barar-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

.barar-strength-bar.weak {
    width: 25%;
    background: #dc3232;
}

.barar-strength-bar.medium {
    width: 50%;
    background: #f56e28;
}

.barar-strength-bar.strong {
    width: 75%;
    background: #46b450;
}

.barar-strength-bar.very-strong {
    width: 100%;
    background: #00a32a;
}

.barar-password-hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* Tabs */
.barar-tabs {
    display: flex;
    border-bottom: 2px solid #e5e5e5;
    margin-bottom: 24px;
    gap: 0;
}

.barar-tab {
    flex: 1;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #999;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    text-align: center;
}

.barar-tab:hover {
    color: #555;
}

.barar-tab.active {
    color: #2271b1;
    border-bottom-color: #2271b1;
}

.barar-tab:focus {
    outline: 2px solid #2271b1;
    outline-offset: -2px;
}

.barar-tab-pane {
    display: none;
}

.barar-tab-pane.active {
    display: block;
}

/* Logout */
.barar-logout-greeting {
    font-size: 16px;
    margin-bottom: 20px;
    text-align: center;
}

/* Shortcode area */
.barar-shortcode-area {
    margin: 16px 0;
}

.barar-shortcode-area:empty {
    display: none;
}

/* Field validation */
.barar-field-error {
    font-size: 12px;
    color: #dc3232;
    margin-top: 4px;
    display: block;
}

/* Field hint text */
.barar-field-hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
    font-style: italic;
}

/* Login method selector */
.barar-login-methods {
    display: flex;
    gap: 0;
    border: 1px solid #dcd7ca;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 18px;
}

.barar-method-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    background: #f9f9f9;
    border-right: 1px solid #dcd7ca;
    transition: background 0.2s, color 0.2s;
    user-select: none;
    margin: 0;
}

.barar-method-option:last-child {
    border-right: none;
}

.barar-method-option input[type="radio"] {
    margin: 0;
    accent-color: #2271b1;
}

.barar-method-option:has(input:checked) {
    background: #fff;
    color: #2271b1;
    font-weight: 600;
}

.barar-method-option:hover {
    background: #f0f0f0;
}

/* Section title */
.barar-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 24px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

/* Profile form */
.barar-profile-form .barar-field-group input[readonly] {
    background: #f6f7f7;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Back link */
.barar-back-link {
    font-size: 13px;
    color: #2271b1;
    text-decoration: none;
}

.barar-back-link:hover {
    text-decoration: underline;
}

/* Reset form */
.barar-pw-reset-form .barar-field-group:last-of-type {
    margin-bottom: 0;
}

/* Focus visible for keyboard navigation */
.barar-tab:focus-visible,
.barar-button:focus-visible,
.barar-input:focus-visible,
.barar-toggle-password:focus-visible,
.barar-method-option input[type="radio"]:focus-visible + .barar-method-label {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Skip link for screen readers */
.barar-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
}

.barar-skip-link:focus {
    left: 8px;
}

/* Screen reader only */
.barar-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive */
@media (max-width: 480px) {
    .barar-form-wrapper {
        padding: 20px 16px;
        margin: 10px auto;
    }

    .barar-tab {
        padding: 10px 12px;
        font-size: 13px;
    }

    .barar-input {
        padding: 8px 12px;
        font-size: 13px;
    }

    .barar-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Tablet responsive */
@media (min-width: 481px) and (max-width: 768px) {
    .barar-form-wrapper {
        padding: 24px 20px;
    }

    .barar-login-methods {
        flex-direction: column;
    }

    .barar-method-option {
        border-right: none;
        border-bottom: 1px solid #dcd7ca;
    }

    .barar-method-option:last-child {
        border-bottom: none;
    }
}

/* Admin specific styles */
.barar-admin-wrap .nav-tab-wrapper {
    margin-bottom: 20px;
}

.barar-admin-wrap .form-table th {
    width: 220px;
}

.barar-admin-wrap .barar-color-picker {
    width: 80px;
}
