/* 
==============================================
PROFILE SECTION STYLES
==============================================
*/

/* Ensure profile section follows the same pattern as other sections */
#profile-section {
    position: relative;
    z-index: 2;
    display: none;
    padding-top: 90px;
    width: 96%;
    margin: auto;
}

#profile-section.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Profile Container - Modern minimal layout */
.profile-container {
    padding: 0;
    margin: 0;
    width: 100%;
    position: relative;
}

.profile-form-wrapper {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    width: 100%;
    max-width: 100%;
    text-align: left;
}

/* Two-column grid layout for forms */
.profile-forms-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.profile-column {
    display: flex;
    flex-direction: column;
}

.profile-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Profile links section */
.profile-links {
    display: flex;
    justify-content: center;
    padding-top: 1rem;
}

/* Form label, input, and focus styles now in form-sections-shared.css */

/* Profile button styles now in form-sections-shared.css */

/* Profile Picture Upload Styles */
.profile-picture-group {
    margin-bottom: 2rem;
    width: 100%;
    grid-column: 1 / -1;
}

.profile-picture-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.profile-picture-preview {
    position: relative;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 3px solid rgba(171, 171, 171, 0.41);
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.profile-picture-preview:hover {
    border-color: rgba(171, 171, 171, 0.8);
}

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

.profile-picture-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(171, 171, 171, 0.7);
    text-align: center;
    font-size: 12px;
    font-family: 'Overpass', sans-serif;
    pointer-events: none; /* Prevent this element from capturing clicks */
    transition: background-color 0.3s ease;
}

.profile-picture-preview:hover .profile-picture-placeholder {
    background-color: rgba(255, 255, 255, 0.1);
}

.profile-picture-buttons {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.profile-picture-upload-btn,
.profile-picture-remove-btn,
.profile-picture-ai-toggle-btn {
    background: none;
    border: none;
    color: rgba(171, 171, 171, 0.7);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    min-width: auto;
}

.profile-picture-upload-btn:hover,
.profile-picture-remove-btn:hover,
.profile-picture-ai-toggle-btn:hover {
    background: none;
    border: none;
    color: rgba(171, 171, 171, 1);
    transform: scale(1.1);
}

.profile-picture-upload-btn i,
.profile-picture-remove-btn i,
.profile-picture-ai-toggle-btn i {
    font-size: 22px;
}

/* AI Generation Section */
.profile-picture-ai-section {
    width: 100%;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.ai-prompt-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.ai-prompt-input {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(171, 171, 171, 0.41);
    border-radius: 5px;
    background: transparent;
    color: rgba(171, 171, 171, 0.8);
    font-family: 'Overpass', sans-serif;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s ease;
}

.ai-prompt-input:focus {
    outline: none;
    border-color: rgba(171, 171, 171, 0.8);
    color: rgba(171, 171, 171, 1);
}

.ai-prompt-input::placeholder {
    color: rgba(171, 171, 171, 0.5);
}

.profile-picture-ai-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(102, 126, 234, 0.5);
    border-radius: 5px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-family: 'Overpass', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.profile-picture-ai-btn:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    transform: translateY(-1px);
}

.profile-picture-ai-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.profile-picture-ai-btn i {
    font-size: 16px;
}

/* Spin animation for loading */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Profile picture view modal - custom content only, uses global .modal styles */
.profile-picture-modal-content {
    padding: 0;
    max-width: 600px;
    width: 90%;
}

.profile-picture-modal-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.profile-picture-preview {
    transition: opacity 0.3s ease;
}

.profile-picture-preview:hover {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .profile-forms-columns {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .profile-container {
        padding: 1rem;
    }

    .profile-forms-columns {
        gap: 1rem;
    }

    .profile-column {
        max-width: 100%;
    }

    .profile-title {
        font-size: 28px;
    }

    .profile-picture-preview {
        width: 100px;
        height: 100px;
    }

    .profile-picture-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .profile-picture-buttons {
        flex-direction: row;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .profile-picture-upload-btn i,
    .profile-picture-remove-btn i,
    .profile-picture-ai-toggle-btn i {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .profile-container {
        padding: 0.5rem;
    }
    
    .profile-title {
        font-size: 24px;
    }
    
    .profile-forms-columns {
        gap: 1rem;
    }

    .profile-picture-buttons {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
    }

    .ai-prompt-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .profile-picture-upload-btn i,
    .profile-picture-remove-btn i,
    .profile-picture-ai-toggle-btn i {
        font-size: 18px;
    }

    .profile-picture-modal-content {
        max-width: 95%;
        width: 95%;
    }
}
