/* Front-End Profile Manager Styles */

.fepm-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

input#fepm_user_email {
    margin-bottom: 15px;
}


.fepm-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.fepm-form-section {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.fepm-form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.fepm-form-section h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.fepm-description {
    margin: -10px 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    padding-top: 15px;
}

/* Image Upload Section */
.fepm-image-upload {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.fepm-current-image {
    flex-shrink: 0;
}

.fepm-current-image img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e5e5;
    transition: border-color 0.3s;
}

.fepm-current-image img:hover {
    border-color: #4CAF50;
}

.fepm-upload-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Form Layout */
.fepm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.fepm-form-group {
    margin-bottom: 20px;
}

.fepm-form-group:last-child {
    margin-bottom: 0;
}

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

.fepm-required {
    color: #dc3545;
    margin-left: 2px;
}

/* Form Inputs */
.fepm-input,
.fepm-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
    box-sizing: border-box;
}

.fepm-input:focus,
.fepm-textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.fepm-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.fepm-button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1.5;
}

.fepm-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.fepm-button:active {
    transform: translateY(0);
}

.fepm-button-primary {
    background: #4CAF50;
    color: white;
    font-size: 16px;
    padding: 14px 32px;
}

.fepm-button-primary:hover {
    background: #45a049;
}

.fepm-button-secondary {
    background: #2196F3;
    color: white;
}

.fepm-button-secondary:hover {
    background: #0b7dda;
}

.fepm-button-danger {
    background: #f44336;
    color: white;
}

.fepm-button-danger:hover {
    background: #da190b;
}

.fepm-form-actions {
    text-align: center;
    padding-top: 0px;
    margin-top: 20px;
}

/* Notices */
.fepm-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    max-width: 400px;
    animation: fepm-slide-in 0.3s ease-out;
    font-size: 14px;
}

.fepm-notice p {
    margin: 5px 0;
    line-height: 1.5;
}

.fepm-notice p:first-child {
    margin-top: 0;
}

.fepm-notice p:last-child {
    margin-bottom: 0;
}

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

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

@keyframes fepm-slide-in {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading State */
.fepm-form.fepm-loading {
    opacity: 0.6;
    pointer-events: none;
}

.fepm-form.fepm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: fepm-spin 1s linear infinite;
}

@keyframes fepm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .fepm-container {
        padding: 10px;
    }
    
    .fepm-form {
        padding: 20px;
    }
    
    .fepm-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .fepm-image-upload {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fepm-upload-controls {
        width: 100%;
    }
    
    .fepm-button {
        width: 100%;
    }
    
    .fepm-notice {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .fepm-form-actions {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .fepm-current-image img {
        width: 120px;
        height: 120px;
    }
    
    .fepm-form-section h3 {
        font-size: 18px;
    }
}
/* Password Strength Indicator */
.fepm-password-strength {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 3px;
    display: inline-block;
}

.fepm-password-strength.weak {
    background: #ffebee;
    color: #c62828;
}

.fepm-password-strength.medium {
    background: #fff3e0;
    color: #ef6c00;
}

.fepm-password-strength.strong {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Error Message */
.fepm-input-error {
    border-color: #dc3545 !important;
}

.fepm-error-message {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
}

/* Character Counter */
.fepm-char-counter {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    text-align: right;
}

.fepm-char-counter.fepm-limit-reached {
    color: #dc3545;
    font-weight: 600;
}

.fepm-char-counter .current {
    font-weight: 600;
}

/* ── Image Crop Modal ─────────────────────────────────── */
body.fepm-modal-open {
    overflow: hidden;
}

#fepm-crop-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
}

#fepm-crop-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

#fepm-crop-container {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#fepm-crop-container h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.fepm-crop-hint {
    margin: 0;
    font-size: 13px;
    color: #666;
}

#fepm-crop-image-wrapper {
    width: 100%;
    max-height: 420px;
    overflow: hidden;
    border-radius: 4px;
    background: #111;
}

#fepm-crop-image {
    display: block;
    max-width: 100%;
}

#fepm-crop-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@media (max-width: 480px) {
    #fepm-crop-container {
        padding: 16px;
    }

    #fepm-crop-image-wrapper {
        max-height: 280px;
    }

    #fepm-crop-actions {
        flex-direction: column-reverse;
    }

    #fepm-crop-actions .fepm-button {
        width: 100%;
    }
}