/* ================================
   PROFILE EDIT MODAL STYLES
   ================================ */

/* Modal Overlay */
.profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-modal.show {
    display: flex !important;
    opacity: 1;
}

/* Modal Content */
.profile-modal-content {
    background: #ffffff;
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.profile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #e2e8f0;
}

.profile-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-modal-header h2 i {
    color: #2563eb;
}

.profile-modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.2s;
}

.profile-modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Modal Body */
.profile-modal-body {
    padding: 30px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.form-group label i {
    color: #2563eb;
    margin-right: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Avatar Upload Section */
.avatar-upload-section {
    display: flex;
    gap: 20px;
    align-items: center;
}

.current-avatar {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.current-avatar img,
.current-avatar .avatar {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    border-radius: 0;
    border: none;
    object-fit: cover !important;
    object-position: center !important;
    display: block;
}

.avatar-upload-controls {
    flex: 1;
}

.btn-upload-avatar {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-upload-avatar:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.avatar-upload-hint {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 0.85rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.avatar-upload-hint i {
    color: #2563eb;
}

/* Profile Message */
.profile-message {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.profile-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bcf0da;
}

.profile-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.profile-message i {
    font-size: 1.1rem;
}

/* Modal Actions */
.profile-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn-cancel,
.btn-save {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    border: none;
}

.btn-cancel {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.btn-cancel:hover {
    background: #e2e8f0;
}

.btn-save {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-save:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Edit Profile Button in Dashboard */
.btn-edit-profile {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-edit-profile:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 600px) {
    .profile-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .profile-modal-header,
    .profile-modal-body {
        padding: 20px;
    }

    .avatar-upload-section {
        flex-direction: column;
        text-align: center;
    }

    .profile-modal-actions {
        flex-direction: column-reverse;
    }

    .btn-cancel,
    .btn-save {
        width: 100%;
        justify-content: center;
    }

    .header-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-edit-profile {
        width: 100%;
        justify-content: center;
    }
}