/* Profile Modal Backdrop */
.profile-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.profile-modal-backdrop.active {
    display: block;
}

/* Profile Modal Overlay */
.profile-modal-overlay {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-height: 85vh;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 10000;
}

.profile-modal-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Profile Modal Box */
.profile-modal-box {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Profile Modal Header */
.profile-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f1f3 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.profile-modal-header h3 {
    font-size: 18px;
    color: #333;
    font-weight: 600;
    margin: 0;
}

/* Profile Modal Close Button */
.profile-modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.profile-modal-close-btn:hover {
    background: #e9ecef;
    color: #333;
}

/* Profile Modal Content */
.profile-modal-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Profile About Section */
.profile-modal-about {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    max-height: 120px;
    transition: all 0.2s ease;
}

.profile-modal-about:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Profile Modal File Label */
.profile-modal-file-label {
    position: relative;
    display: block;
    margin-bottom: 20px;
    cursor: pointer;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.profile-modal-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ddd;
    transition: all 0.2s ease;
}

.profile-modal-file-label:hover .profile-modal-pic {
    border-color: #007bff;
}

.profile-modal-camera-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #007bff;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.profile-modal-file-label:hover .profile-modal-camera-icon {
    background: #0056b3;
    transform: scale(1.1);
}

.profile-modal-file-input {
    display: none;
}

/* Profile Modal Form Sections */
.profile-modal-form-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

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

.profile-modal-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

/* Profile Modal Form Row */
.profile-modal-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

/* Profile Modal Inputs */
.profile-modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.profile-modal-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.profile-modal-form-row .profile-modal-input {
    margin-bottom: 0;
}

/* Profile Modal Gender Container */
.profile-modal-gender-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.profile-modal-gender-btn {
    padding: 10px 16px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.profile-modal-gender-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.profile-modal-gender-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

/* Profile Modal Submit Button */
.profile-modal-submit-btn {
    width: 100%;
    padding: 12px 16px;
    margin-top: 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-modal-submit-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.profile-modal-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

/* Scrollbar Styling */
.profile-modal-content::-webkit-scrollbar {
    width: 6px;
}

.profile-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.profile-modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.profile-modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-modal-overlay {
        width: 90%;
        max-width: 500px;
        max-height: 90vh;
    }

    .profile-modal-header h3 {
        font-size: 16px;
    }

    .profile-modal-pic {
        width: 100px;
        height: 100px;
    }

    .profile-modal-form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .profile-modal-overlay {
        width: 95%;
        max-height: 95vh;
    }

    .profile-modal-content {
        padding: 15px;
    }

    .profile-modal-header h3 {
        font-size: 14px;
    }

    .profile-modal-pic {
        width: 90px;
        height: 90px;
    }

    .profile-modal-input {
        font-size: 13px;
        padding: 8px 10px;
    }

    .profile-modal-gender-container {
        grid-template-columns: 1fr 1fr;
    }
}