/* Styles for User Authentication (PickPCParts Core plugin) */

/* Container for alignment in the header */
.pcp-header-auth-container {
    margin-left: auto;
    align-self: center; /* Better vertical alignment */
    padding-right: 20px; /* Or as needed */
    height: 100%;
    display: flex;
    align-items: center;
}

/* --- Logged-out state --- */
.pcp-header-auth-links {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between buttons */
}
.pcp-header-auth-links a {
    border: 1px solid black;
    color: black;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}
.pcp-header-auth-links a:hover {
    background-color: black;
    color: white;
}

/* --- Logged-in state --- */
.pcp-header-user-menu {
    position: relative;
    cursor: pointer;
}
.pcp-header-user-menu > span {
    display: inline-block; /* To apply padding */
    padding: 10px 5px; /* Creates a larger hover area vertically */
}
.pcp-user-dropdown {
    display: none;
    position: absolute;
    top: 100%; /* Position right below the menu container */
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* Softer shadow */
    list-style: none;
    padding: 5px 0; /* Reduced padding */
    margin: 0; /* REMOVED margin-top to fix the gap issue */
    z-index: 1000;
    min-width: 180px; /* A bit wider */
}
.pcp-header-user-menu:hover .pcp-user-dropdown {
    display: block;
}
.pcp-user-dropdown li {
    margin: 0;
}
.pcp-user-dropdown li a {
    display: block;
    padding: 10px 20px; /* More padding */
    color: #333;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}
.pcp-user-dropdown li a:hover {
    background-color: #f5f5f5;
    color: #000;
}

/* NEW: Password Strength Indicator */
#password-strength {
    margin-top: 8px;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

#password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Password strength colors */
#password-strength-bar.very-weak {
    background-color: #ef4444;
}

#password-strength-bar.weak {
    background-color: #f59e0b;
}

#password-strength-bar.medium {
    background-color: #f59e0b;
}

#password-strength-bar.strong {
    background-color: #10b981;
}

#password-strength-bar.very-strong {
    background-color: #059669;
}

/* Password feedback text */
#password-strength-text,
#password-match-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
}

/* NEW: Status message styling for forms */
.status-msg {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
}

.status-msg.error {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.status-msg.success {
    background-color: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

/* Form field styling improvements */
#pcp-auth-form-container input[type="password"],
#pcp-auth-form-container input[type="text"],
#pcp-auth-form-container input[type="email"],
#pcp-auth-form-container input[type="date"] {
    transition: all 0.2s ease;
}

#pcp-auth-form-container input[type="password"]:focus,
#pcp-auth-form-container input[type="text"]:focus,
#pcp-auth-form-container input[type="email"]:focus,
#pcp-auth-form-container input[type="date"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

/* Submit button improvements */
#pcp-auth-form-container input[type="submit"] {
    transition: all 0.2s ease;
    font-weight: 600;
}

#pcp-auth-form-container input[type="submit"]:hover {
    background-color: #0056b3 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

#pcp-auth-form-container input[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Help text styling */
#pcp-auth-form-container small {
    line-height: 1.4;
    margin-top: 4px;
    display: block;
}

/* Responsive improvements */
@media (max-width: 480px) {
    #pcp-auth-form-container {
        margin: 1em auto;
        padding: 1.5em;
    }
    
    #pcp-auth-form-container h2 {
        font-size: 1.5em;
    }
} 