/**
 * Ping User Portal Styles
 * 
 * @package PingUserPortal
 * @version 1.0.0
 */

/* ==========================================================================
   Form Container
   ========================================================================== */

.pup-form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.pup-account-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.pup-message {
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.pup-message-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.pup-message-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.pup-message-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.pup-form {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pup-form h2 {
    margin: 0 0 25px;
    padding: 0 0 15px;
    font-size: 26px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
}

.pup-form h3 {
    margin: 30px 0 15px;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.pup-section-description {
    color: #666;
    font-size: 14px;
    margin: -10px 0 20px;
}

/* ==========================================================================
   Form Rows
   ========================================================================== */

.pup-form-row {
    margin-bottom: 20px;
}

.pup-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.pup-form-row label .required {
    color: #dc3545;
    font-weight: bold;
}

.pup-form-row input[type="text"],
.pup-form-row input[type="email"],
.pup-form-row input[type="password"],
.pup-form-row input[type="tel"],
.pup-form-row textarea,
.pup-form-row select {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    line-height: 1.5;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-sizing: border-box;
}

.pup-form-row input[type="text"]:focus,
.pup-form-row input[type="email"]:focus,
.pup-form-row input[type="password"]:focus,
.pup-form-row input[type="tel"]:focus,
.pup-form-row textarea:focus,
.pup-form-row select:focus {
    outline: none;
    border-color: #377002;
    box-shadow: 0 0 0 3px rgba(55, 112, 2, 0.1);
}

.pup-form-row input[disabled] {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.pup-field-note {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* ==========================================================================
   Checkbox Rows
   ========================================================================== */

.pup-checkbox-row label {
    display: inline-flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
}

.pup-checkbox-row input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.pup-submit-button,
.pup-form button[type="submit"],
.pup-form input[type="submit"] {
    display: inline-block;
    width: 100%;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #377002;
    border: 2px solid #377002;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.pup-submit-button:hover,
.pup-form button[type="submit"]:hover,
.pup-form input[type="submit"]:hover {
    background-color: #2a5501;
    border-color: #2a5501;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(55, 112, 2, 0.3);
}

.pup-submit-button:active,
.pup-form button[type="submit"]:active,
.pup-form input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(55, 112, 2, 0.2);
}

/* ==========================================================================
   Form Links
   ========================================================================== */

.pup-form-links {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
    text-align: center;
}

.pup-form-links p {
    margin: 8px 0;
    font-size: 14px;
    color: #666;
}

.pup-form-links a {
    color: #377002;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease-in-out;
}

.pup-form-links a:hover {
    color: #2a5501;
    text-decoration: underline;
}

/* ==========================================================================
   Account Page
   ========================================================================== */

.pup-account-header {
    margin-bottom: 30px;
}

.pup-account-header h2 {
    margin: 0 0 10px;
    font-size: 28px;
    color: #333;
}

.pup-account-header p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

.pup-account-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e1e1;
    text-align: center;
}

.pup-logout-link {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    color: #dc3545;
    text-decoration: none;
    border: 1px solid #dc3545;
    border-radius: 4px;
    transition: all 0.2s ease-in-out;
}

.pup-logout-link:hover {
    background-color: #dc3545;
    color: #ffffff;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media screen and (max-width: 768px) {
    .pup-form-container,
    .pup-account-container {
        padding: 15px;
    }
    
    .pup-form {
        padding: 20px;
    }
    
    .pup-form h2 {
        font-size: 22px;
    }
    
    .pup-form h3 {
        font-size: 18px;
    }
    
    .pup-form-row input[type="text"],
    .pup-form-row input[type="email"],
    .pup-form-row input[type="password"],
    .pup-form-row input[type="tel"],
    .pup-form-row textarea,
    .pup-form-row select {
        font-size: 16px; /* Prevent iOS zoom on focus */
    }
    
    .pup-submit-button,
    .pup-form button[type="submit"],
    .pup-form input[type="submit"] {
        padding: 12px 20px;
        font-size: 15px;
    }
}

@media screen and (max-width: 480px) {
    .pup-form {
        padding: 15px;
    }
    
    .pup-form h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.pup-form input:focus,
.pup-form select:focus,
.pup-form textarea:focus,
.pup-form button:focus {
    outline: 2px solid #377002;
    outline-offset: 2px;
}

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

/* ==========================================================================
   Password Visibility Toggle
   ========================================================================== */

.pup-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pup-password-wrapper input {
    flex: 1;
    padding-right: 45px;
}

.pup-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 20px;
    line-height: 1;
    color: #666;
    transition: color 0.2s ease-in-out;
}

.pup-toggle-password:hover {
    color: #377002;
}

.pup-toggle-password:focus {
    outline: 2px solid #377002;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ==========================================================================
   Password Strength Indicator
   ========================================================================== */

.pup-password-strength {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    display: none;
}

.pup-password-strength.weak {
    display: block;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.pup-password-strength.medium {
    display: block;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.pup-password-strength.strong {
    display: block;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* ==========================================================================
   Password Match Indicator
   ========================================================================== */

.pup-password-match {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.pup-password-match.match {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.pup-password-match.mismatch {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* ==========================================================================
   Field Validation
   ========================================================================== */

.pup-field-error {
    display: block;
    margin-top: 6px;
    padding: 6px 10px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    font-size: 13px;
}

.pup-field-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.pup-text-center {
    text-align: center;
}

.pup-mt-10 {
    margin-top: 10px;
}

.pup-mt-20 {
    margin-top: 20px;
}

.pup-mb-10 {
    margin-bottom: 10px;
}

.pup-mb-20 {
    margin-bottom: 20px;
}
