/* MMSN Team Plugin Frontend Styles */

.mmsn-team-wrapper {
    width: 100%;
    margin: 20px 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mmsn-team-wrapper * {
    box-sizing: border-box;
}

.mmsn-frontend-grid-empty {
    padding: 30px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    color: #64748b;
    font-size: 15px;
}

/* 1. TEAM GRID */
.mmsn-team-flex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    width: 100%;
}

.mmsn-team-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 320px;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mmsn-team-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.15), 0 8px 10px -6px rgba(0,0,0,0.15);
}

.mmsn-team-card-photo-wrapper {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: flex-end;
    transition: transform 0.5s ease;
}

.mmsn-team-card:hover .mmsn-team-card-photo-wrapper {
    transform: scale(1.05);
}

.mmsn-team-card-overlay {
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.5) 65%, rgba(15, 23, 42, 0.05) 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mmsn-team-enlarge-icon {
    font-size: 16px;
    color: #ffffff;
    background: #004E66;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.mmsn-team-card:hover .mmsn-team-enlarge-icon {
    opacity: 1;
    transform: translateY(0);
}

.mmsn-team-card-name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    line-height: 1.3;
}

.mmsn-team-card-designation {
    margin: 4px 0 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1 !important;
}

/* 2. SINGLE PROFILE VIEW */
.mmsn-team-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    color: #334155;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

.mmsn-team-back-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateX(-2px);
}

.mmsn-team-loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
    width: 100%;
}

.mmsn-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 78, 102, 0.1);
    border-top-color: #004E66;
    border-radius: 50%;
    animation: mmsn-spin 1s linear infinite;
}

@keyframes mmsn-spin {
    to { transform: rotate(360deg); }
}

.mmsn-team-profile-error {
    text-align: center;
    color: #ef4444;
    padding: 20px 0;
}

.mmsn-team-profile-body {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
}

/* Left side: photo, name, designation */
.mmsn-team-profile-side {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mmsn-team-profile-photo {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    margin-bottom: 16px;
}

.mmsn-team-profile-name {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.mmsn-team-profile-designation {
    margin: 6px 0 0 0;
    font-size: 14px;
    font-weight: 600;
    color: #004E66;
}

/* Right side: description / saying */
.mmsn-team-profile-desc {
    flex: 1;
    border-left: 1px solid #e2e8f0;
    padding-left: 40px;
}

.mmsn-team-profile-description {
    margin: 0;
    font-size: 15px;
    line-height: 1.8;
    color: #334155;
    white-space: pre-line;
}

/* RESPONSIVE LAYOUTS */

@media (max-width: 767px) {
    .mmsn-team-flex-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
    .mmsn-team-card {
        height: 220px;
    }
    .mmsn-team-profile-body {
        flex-direction: column;
        align-items: center;
        padding: 20px;
        gap: 24px;
    }
    .mmsn-team-profile-desc {
        border-left: none;
        border-top: 1px solid #e2e8f0;
        padding-left: 0;
        padding-top: 24px;
        width: 100%;
    }
}
