/**
 * Team Member Profile Modal Styles
 * Modern Facebook-like profile interface
 */

/* ===== MODAL OVERLAY ===== */
.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
}

/* ===== MODAL CONTAINER ===== */
.profile-modal-container {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

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

/* Close Button */
.profile-modal-close {
    position: sticky;
    top: 0;
    right: 0;
    background: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    float: right;
    margin: 10px;
    transition: all 0.2s ease;
    color: #666;
}

.profile-modal-close:hover {
    background: #f0f0f0;
    color: #000;
}

/* ===== LOADING STATE ===== */
.profile-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    gap: 20px;
    min-height: 400px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.profile-loading-state p {
    color: #666;
    font-size: 14px;
}

/* ===== ERROR STATE ===== */
.profile-error-state {
    padding: 40px;
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.profile-error-state p {
    color: #d32f2f;
    font-size: 16px;
    margin: 0;
}

.profile-error-state button {
    padding: 8px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.profile-error-state button:hover {
    background: #0056b3;
}

/* ===== PROFILE CONTENT ===== */
.profile-content {
    clear: both;
}

/* Header/Cover */
.profile-header {
    position: relative;
    margin-bottom: 20px;
}

.profile-cover {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.profile-photo-section {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 0 20px 20px;
    margin-top: -60px;
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid white;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.profile-name-section {
    flex: 1;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 5px;
}

.profile-name {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #000;
}

.profile-job-title {
    margin: 4px 0 0;
    font-size: 14px;
    color: #666;
}

.profile-status {
    margin: 4px 0 0;
    font-size: 12px;
    color: #999;
}

/* ===== TABS ===== */
.profile-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    background: #fafafa;
    padding: 0 20px;
    gap: 0;
    sticky: top;
}

.profile-tab {
    flex: 1;
    padding: 12px 0;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.profile-tab:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.02);
}

.profile-tab.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

/* ===== TAB CONTENT ===== */
.profile-tabs-content {
    padding: 20px;
}

.profile-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.profile-tab-content.active {
    display: block;
}

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

/* ===== SECTIONS ===== */
.profile-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* ===== FIELDS GRID ===== */
.fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

@media (max-width: 600px) {
    .fields-grid {
        grid-template-columns: 1fr;
    }
}

/* Individual Field */
.profile-field {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #007bff;
    transition: all 0.2s ease;
}

.profile-field:hover {
    background: #f0f0f0;
    transform: translateX(4px);
}

.field-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.field-value {
    font-size: 14px;
    color: #000;
    word-break: break-word;
    line-height: 1.5;
}

.field-value a {
    color: #007bff;
    text-decoration: none;
}

.field-value a:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ===== PERMISSION DENIED NOTICE ===== */
.permission-denied-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px;
    color: #856404;
    font-size: 13px;
}

.permission-denied-notice strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.permission-denied-notice p {
    margin: 0;
    line-height: 1.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .profile-modal-container {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 95vh;
    }

    .profile-cover {
        height: 150px;
    }

    .profile-photo {
        width: 100px;
        height: 100px;
        margin-top: -50px;
    }

    .profile-name {
        font-size: 20px;
    }

    .profile-photo-section {
        gap: 15px;
        padding: 0 15px 15px;
    }

    .profile-tabs {
        padding: 0 15px;
    }

    .profile-tab {
        padding: 10px 0;
        font-size: 13px;
    }

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

    .fields-grid {
        gap: 15px;
    }

    .profile-field {
        padding: 12px;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .profile-modal-container {
        background: #1e1e1e;
        color: #fff;
    }

    .profile-modal-close {
        background: #333;
        color: #ccc;
    }

    .profile-modal-close:hover {
        background: #444;
        color: #fff;
    }

    .profile-name {
        color: #fff;
    }

    .profile-job-title,
    .profile-status {
        color: #aaa;
    }

    .profile-tabs {
        background: #2a2a2a;
        border-bottom-color: #444;
    }

    .profile-tab {
        color: #aaa;
    }

    .profile-tab:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.05);
    }

    .profile-tab.active {
        color: #4a9eff;
    }

    .section-title {
        color: #fff;
        border-bottom-color: #333;
    }

    .profile-field {
        background: #2a2a2a;
        border-left-color: #4a9eff;
    }

    .profile-field:hover {
        background: #333;
    }

    .field-label {
        color: #999;
    }

    .field-value {
        color: #fff;
    }

    .empty-state {
        background: #2a2a2a;
        color: #666;
    }

    .permission-denied-notice {
        background: #3d3d00;
        border-color: #666;
        color: #ccc;
    }
}

/* ===== UTILITY ===== */
.sticky {
    position: sticky;
    top: 0;
    z-index: 10;
}
