/**
 * SCS Staff Directory - Frontend Styles V2
 * Completely isolated from WordPress theme interference
 * Uses unique prefixes: .scs-sd-*
 */

/* Reset and isolation */
.scs-staff-directory-wrapper {
    all: initial;
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1f2937;
    background: #f9fafb;
    min-height: 100vh;
}

.scs-staff-directory-wrapper * {
    box-sizing: border-box;
}

/* Container */
.scs-sd-container {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Filter Card */
.scs-sd-filter-card {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 3rem;
}

/* Filter Row */
.scs-sd-filter-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .scs-sd-filter-row {
        flex-direction: row;
        gap: 1.5rem;
    }
}

/* Filter Group */
.scs-sd-filter-group {
    flex: 1;
    min-width: 0;
}

/* Label */
.scs-sd-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

/* Search Input */
.scs-sd-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.scs-sd-search-icon {
    position: absolute;
    left: 0.875rem;
    width: 16px;
    height: 16px;
    color: #9ca3af;
    pointer-events: none;
    z-index: 1;
}

.scs-sd-search-input {
    width: 100%;
    height: 42px;
    padding: 0 1rem 0 2.75rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #1f2937;
    outline: none;
    transition: all 0.2s;
    line-height: 42px;
}

.scs-sd-search-input::placeholder {
    color: #9ca3af;
}

.scs-sd-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Select Dropdown */
.scs-sd-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.scs-sd-select {
    width: 100%;
    height: 42px;
    padding: 0 2.5rem 0 1rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #1f2937;
    outline: none;
    cursor: pointer;
    appearance: none;
    transition: all 0.2s;
    line-height: 42px;
}

.scs-sd-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.scs-sd-select-icon {
    position: absolute;
    right: 0.875rem;
    width: 14px;
    height: 14px;
    color: #6b7280;
    pointer-events: none;
    z-index: 1;
}

/* Staff Grid */
.scs-sd-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

@media (min-width: 640px) {
    .scs-sd-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .scs-sd-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .scs-sd-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Staff Card */
.scs-sd-card {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 1rem;
    background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s;
}

.scs-sd-card:hover {
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.25);
    transform: translateY(-4px);
}

.scs-sd-card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s;
}

.scs-sd-card:hover .scs-sd-card-image {
    transform: scale(1.05);
}

.scs-sd-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(26, 58, 92, 0.85) 100%);
}

.scs-sd-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    color: #ffffff;
}

.scs-sd-card-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.scs-sd-card-role {
    font-size: 0.875rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.scs-sd-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #ffffff;
}

/* Expanded Card */
.scs-sd-expanded {
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
    box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.25);
    border: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.scs-sd-expanded-layout {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .scs-sd-expanded-layout {
        flex-direction: row;
    }
}

.scs-sd-expanded-image-section {
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .scs-sd-expanded-image-section {
        width: 33.333%;
    }
}

.scs-sd-expanded-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.scs-sd-expanded-content {
    flex: 1;
    padding: 2rem;
    background: #ffffff;
}

.scs-sd-expanded-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.scs-sd-expanded-name {
    font-size: 1.875rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.scs-sd-expanded-role {
    font-size: 1.125rem;
    color: #3b82f6;
    font-weight: 500;
}

.scs-sd-close-btn {
    padding: 0.5rem;
    border-radius: 9999px;
    background-color: #f3f4f6;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.scs-sd-close-btn:hover {
    background-color: #e5e7eb;
}

.scs-sd-expanded-bio {
    color: #4b5563;
    line-height: 1.75;
    font-size: 1rem;
}

/* Empty State */
.scs-sd-empty {
    text-align: center;
    padding: 4rem 1rem;
}

.scs-sd-empty-icon {
    width: 4rem;
    height: 4rem;
    background-color: #f3f4f6;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.scs-sd-empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.scs-sd-empty-text {
    color: #6b7280;
}
