/* Profile Dropdown Styles */
.profile-dropdown-container {
    position: relative;
    display: inline-block;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--gradient-1);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    /* box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); */
}

.profile-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192 51 81,.4);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar i {
    font-size: 16px;
}

.profile-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-trigger i.fa-chevron-down {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.profile-trigger.active i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 20px;
    background: var(--gradient-1);
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.dropdown-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.dropdown-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-avatar i {
    font-size: 24px;
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
}

.dropdown-user-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-user-info p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

.dropdown-menu {
    padding: 8px;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #374151;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: left;
}

.dropdown-item:hover {
    background: #f3f4f6;
    color: #e72726 ;
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #e72726 ;
}

.dropdown-item.logout-item {
    color: #ef4444;
}

.dropdown-item.logout-item i {
    color: #ef4444;
}

.dropdown-item.logout-item:hover {
    background: #fee2e2;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-dropdown-modals .modal-content {
    /* background: white; */
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    /* max-height: 90vh; */
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.profile-modal-content,
.password-modal-content {
    max-width: 550px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    background: var(--gradient-1);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.modal-close-times {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: white;
    transition: all 0.2s ease;
}

.modal-close-times:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 28px;
    height: calc(100vh - 200px);
    overflow: auto;
    scrollbar-width: thin;
}

/* Profile Picture Section */
.profile-picture-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 24px;
    /* background: #f9fafb; */
    border-radius: 12px;
}

.profile-picture-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.profile-picture-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-picture-preview i {
    font-size: 48px;
    color: white;
}

.profile-picture-actions {
    display: flex;
    gap: 12px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    /* color: #374151; */
    margin-bottom: 8px;
}

.form-group label i {
    color: #e72726 ;
    width: 16px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input:read-only {
    /* background: #f9fafb; */
    color: #6b7280;
    cursor: not-allowed;
}

.form-input::placeholder {
    color: #9ca3af;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
    background-color: var(--bg-primary);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #e72726;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    display: none;
}

.password-strength.show {
    display: block;
}

.password-strength::before {
    content: '';
    display: block;
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength.weak::before {
    width: 33%;
    background: #ef4444;
}

.password-strength.medium::before {
    width: 66%;
    background: #f59e0b;
}

.password-strength.strong::before {
    width: 100%;
    background: #10b981;
}

/* Password Requirements */
.password-requirements {
    margin: 20px 0;
    padding: 16px;
    /* background: #f9fafb; */
    border-radius: 10px;
    border-left: 4px solid #e72726;
}

.password-requirements h4 {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 600;
    /* color: #374151; */
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    /* color: #6b7280; */
    margin-bottom: 8px;
}

.password-requirements li:last-child {
    margin-bottom: 0;
}

.password-requirements li i {
    /* font-size: 8px; */
    /* color: #d1d5db; */
    transition: color 0.2s ease;
}

.password-requirements li.valid i {
    color: #10b981;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-secondary.btn-remove {
    color: #ef4444;
}

.btn-secondary.btn-remove:hover {
    background: #fee2e2;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Dark Theme Support */
body.dark-theme .profile-dropdown {
    background: #1f2937;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

body.dark-theme .dropdown-divider {
    background: #374151;
}

body.dark-theme .dropdown-item {
    color: #e5e7eb;
}

body.dark-theme .dropdown-item:hover {
    background: #374151;
}

body.dark-theme .header-dropdown-modals .modal-content {
    background: #1f2937;
}

body.dark-theme .modal-body {
    background: #1f2937;
}

body.dark-theme .form-input {
    background: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

body.dark-theme .form-input:focus {
    border-color: #667eea;
    background: #374151;
}

body.dark-theme .form-input:read-only {
    background: #2d3748;
    color: #9ca3af;
}

body.dark-theme .form-group label {
    color: #e5e7eb;
}

body.dark-theme .profile-picture-section,
body.dark-theme .password-requirements {
    background: #374151;
}

body.dark-theme .password-requirements h4,
body.dark-theme .password-requirements li {
    color: #e5e7eb;
}

body.dark-theme .modal-actions {
    border-top-color: #374151;
}

body.dark-theme .btn-secondary {
    background: #374151;
    color: #e5e7eb;
}

body.dark-theme .btn-secondary:hover {
    background: #4b5563;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-dropdown {
        width: calc(100vw - 250px);
        right: -20px;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 18px;
        color: #fff !important;
    }
    
    .profile-picture-preview {
        width: 100px;
        height: 100px;
    }
    
    .profile-picture-preview i {
        font-size: 40px;
    }
    
    .modal-actions {
        flex-direction: column-reverse;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .profile-name {
        display: none;
    }
    
    .profile-trigger {
        padding: 8px 12px;
    }
}