﻿.user-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 20px;
}

.account-card,
.settings-card,
.contact-card {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.contact-card {
    max-width: 900px;
}

.contact-card ul.validation-errors {
    background: #EEE;
    border-radius: 8px;
    padding: 12px 20px 12px 30px;
    margin-bottom: 24px;
}

.contact-card ul.validation-errors li.validation-message {
    color: #a94442 !important
}

.user__header {
    background-color: var(--second-color);
    padding: 20px 30px;
    color: white;
}

    .user__header h1 {
        font-size: 28px;
        margin-bottom: 8px;
        color: white;
    }

    .user__header p {
        opacity: 0.9;
        font-size: 14px;
    }

.user__content {
    padding: 20px 30px;
}

.user__section {
    margin-bottom: 40px;
}

    .user__section:last-child {
        margin-bottom: 0;
    }

.user__section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.user__form-group {
    margin-bottom: 24px;
}

    .user__form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #555;
        font-size: 14px;
    }

    .user__form-group input,
    .user__form-group textarea,
    .user__form-group select
    {
        width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
        transition: border-color 0.3s;
    }
    .user__form-group textarea {
        height: 200px;
        resize: none;
    }

        .user__form-group input:focus,
        .user__form-group textarea:focus,
        .user__form-group select:focus
        {
            outline: none;
            border-color: #667eea;
        }

    .user__form-group input[type=file] {
        cursor: pointer;
    }

.file-upload-area {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
    background-color: #fafafa;
}

    .file-upload-area:hover {
        border-color: #667eea;
        background-color: #f0f2ff;
    }

    .file-upload-area .file-upload-icon {
        font-size: 28px;
        color: #999;
        margin-bottom: 8px;
        transition: color 0.3s;
    }

    .file-upload-area:hover .file-upload-icon {
        color: #667eea;
    }

    .file-upload-area .file-upload-text {
        font-size: 14px;
        color: #777;
    }

    .file-upload-area .file-upload-text strong {
        color: #667eea;
    }

    .file-upload-area input[type=file] {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
    }

.file-upload-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    background: #e8f5e9;
    border-radius: 6px;
    font-size: 13px;
    color: #2e7d32;
}

    .file-upload-selected i {
        font-size: 16px;
    }

    .file-upload-selected .file-upload-remove {
        margin-left: auto;
        background: none;
        border: none;
        color: #999;
        cursor: pointer;
        font-size: 16px;
        padding: 0 4px;
        transition: color 0.2s;
    }

        .file-upload-selected .file-upload-remove:hover {
            color: #d32f2f;
        }
    .user__form-group small {
        display: block;
        margin-top: 6px;
        color: #888;
        font-size: 12px;
    }
        .user__form-group small.text-danger {
            color: #a94442;
        }


/* Loading Skeleton Styles */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-user__header {
    height: 32px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-text {
    height: 16px;
    width: 40%;
}

.skeleton-title {
    height: 24px;
    width: 30%;
    margin-bottom: 20px;
}

.skeleton-label {
    height: 14px;
    width: 20%;
    margin-bottom: 8px;
}

.skeleton-input {
    height: 44px;
    width: 100%;
    margin-bottom: 24px;
}

.skeleton-button {
    height: 44px;
    width: 120px;
    display: inline-block;
}

/* Toggle between loading and loaded state with CSS classes */
.loading .loaded-user__content {
    display: none;
}

.loading .skeleton-user__content {
    display: block;
}

.loaded .loaded-user__content {
    display: block;
}

.loaded .skeleton-user__content {
    display: none;
}

.user__section .item-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    margin-bottom: 12px;
}

.user__section .item-group button {
    padding: 10px;
    border-radius: 50px;
    background-color: transparent;
}
.user__section .item-group button:hover {
    background: #e5e7eb;
    color: var(--main-color);
}
.user__section .item-group button i {
    font-size: 18px;
}

.user__section .info-item {
    width: -moz-available;
    width: -webkit-fill-available;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 6px;
}

    .item-group:last-child {
        margin-bottom: 0;
    }

.user__section .info-label {
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.user__section .info-value {
    color: #333;
    font-size: 14px;
}
.user__section .info-value i {
    font-size: 7px;
}


@media (max-width: 1200px) {
    .user-container {
        flex-direction: column;
        gap: 20px;
    }

    .account-card,
    .contact-card,
    .settings-card {
        width: 100%
    }
    
    .user__section .item-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 20px;
    }
    
    .user__section .item-group button  {
        background-color: #f3f4f6;
        font-size: 16px;
        border-radius: 8px;
    }
}
