/* Everthought Apprentice Database - Frontend Styles */

.et-apprentice-database {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Filters Section */
.et-filters {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

.et-filters h3 {
    margin: 0 0 20px 0;
    color: #253873;
    font-size: 24px;
    font-weight: 600;
}

.et-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.et-filter-group {
    flex: 1;
    min-width: 180px;
}

.et-filter-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.et-filter-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.et-filter-group select:hover {
    border-color: #253873;
}

.et-filter-group select:focus {
    outline: none;
    border-color: #253873;
    box-shadow: 0 0 0 3px rgba(37, 56, 115, 0.1);
}

/* Buttons */
.et-btn-primary, .et-btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.et-btn-primary {
    background: #253873;
    color: white;
}

.et-btn-primary:hover {
    background: #1a2850;
    box-shadow: 0 2px 8px rgba(37, 56, 115, 0.3);
}

.et-btn-secondary {
    background: #f5f5f5;
    color: #555;
    border: 2px solid #e0e0e0;
}

.et-btn-secondary:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

#reset-filters {
    min-width: 140px;
}

/* Apprentice Grid */
.et-apprentice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Apprentice Card - Simple minimalistic hover */
.et-apprentice-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.et-apprentice-card:hover {
    box-shadow: 0 4px 20px rgba(37, 56, 115, 0.15);
}

.et-card-photo {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

.et-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.et-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.et-card-content h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.et-card-details {
    flex: 1;
}

.et-detail-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.et-detail-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
    min-width: 110px;
}

.et-detail-value {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 400;
}

.et-badge {
    background: #e8f5dc;
    color: #95CA68;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    display: inline-block;
}

/* Card Icons */
.et-card-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.et-icon-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #999;
    font-size: 13px;
    transition: color 0.3s ease;
}

.et-icon-item.active {
    color: #95CA68;
}

.et-icon-item svg {
    flex-shrink: 0;
}

/* No Results */
.et-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    grid-column: 1 / -1;
}

/* Contact CTA */
.et-contact-cta {
    background: linear-gradient(135deg, #253873 0%, #1a2850 100%);
    color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(37, 56, 115, 0.3);
}

.et-contact-cta h3 {
    margin: 0 0 10px 0;
    font-size: 26px;
    font-weight: 600;
}

.et-contact-cta p {
    margin: 0 0 25px 0;
    font-size: 16px;
    opacity: 0.95;
}

.et-contact-cta .et-btn-primary {
    background: #95CA68;
    color: #253873;
}

.et-contact-cta .et-btn-primary:hover {
    background: #7fb054;
}

/* Loading State */
#apprentice-results.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .et-apprentice-database {
        margin: 20px auto;
    }
    
    .et-filters {
        padding: 20px;
    }
    
    .et-filter-row {
        flex-direction: column;
    }
    
    .et-filter-group {
        width: 100%;
        min-width: 100%;
    }
    
    #reset-filters {
        width: 100%;
    }
    
    .et-apprentice-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .et-contact-cta {
        padding: 30px 20px;
    }
    
    .et-contact-cta h3 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .et-filters h3 {
        font-size: 20px;
    }
    
    .et-card-photo {
        height: 240px;
    }
    
    .et-card-content h4 {
        font-size: 18px;
    }
    
    .et-card-icons {
        flex-direction: column;
        gap: 10px;
    }
}

/* Print Styles */
@media print {
    .et-filters,
    .et-contact-cta {
        display: none;
    }
    
    .et-apprentice-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Enquiry Modal Styles */
.et-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.et-modal-overlay.active {
    display: flex;
}

.et-modal {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.et-modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid #e0e0e0;
    background: #253873;
    color: white;
    border-radius: 12px 12px 0 0;
}

.et-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.et-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.et-modal-close:hover {
    opacity: 0.8;
}

.et-modal-body {
    padding: 30px;
}

.et-form-group {
    margin-bottom: 20px;
}

.et-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #253873;
    font-weight: 600;
    font-size: 14px;
}

.et-form-group label .required {
    color: #e74c3c;
}

.et-form-group input[type="text"],
.et-form-group input[type="email"],
.et-form-group input[type="tel"],
.et-form-group textarea,
.et-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.et-form-group input:focus,
.et-form-group textarea:focus,
.et-form-group select:focus {
    outline: none;
    border-color: #253873;
}

.et-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.et-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.et-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.et-btn-cancel {
    padding: 12px 30px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    color: #555;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.et-btn-cancel:hover {
    background: #f5f5f5;
}

.et-modal-success {
    display: none;
    text-align: center;
    padding: 40px;
}

.et-modal-success.active {
    display: block;
}

.et-modal-success svg {
    width: 80px;
    height: 80px;
    color: #95CA68;
    margin-bottom: 20px;
}

.et-modal-success h3 {
    color: #253873;
    margin: 0 0 10px 0;
}

.et-modal-success p {
    color: #666;
    margin: 0 0 25px 0;
}

/* Status Badge */
.et-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.et-status-badge.available {
    background: #e8f5dc;
    color: #95CA68;
}

.et-status-badge.in-discussion {
    background: #fff3cd;
    color: #856404;
}

.et-status-badge.placed {
    background: #d4edda;
    color: #155724;
}

.et-status-badge.on-hold {
    background: #f8d7da;
    color: #721c24;
}

/* Interest Button on Card */
.et-card-interest-btn {
    width: 100%;
    padding: 12px;
    background: #253873;
    color: white;
    border: none;
    border-radius: 0 0 10px 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: auto;
}

.et-card-interest-btn:hover {
    background: #1a2850;
}

/* Loading Spinner */
.et-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
}

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

.et-btn-primary .et-spinner {
    margin-right: 8px;
    vertical-align: middle;
}

/* Checkbox styles for multiple apprentice selection */
.et-apprentice-checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
}

.et-checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.et-checkbox-item:last-child {
    border-bottom: none;
}

.et-checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.et-checkbox-item label {
    cursor: pointer;
    margin: 0 !important;
    font-weight: 400 !important;
    color: #333 !important;
}
