/* Medical Providers Directory - Public Styles */

/* Import Roboto font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap');

/* Container and Layout */
.mpd-providers-wrapper {
    max-width: 100%;
    margin: 20px 0;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Filters Section */
.mpd-filters-section {
    background: #fafbfc;
    padding: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.mpd-search-group {
    margin-bottom: 15px;
}

.mpd-search-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #4a5568;
    font-size: 14px;
}

.mpd-search-group input[type="text"] {
    width: 100%;
    max-width: 400px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    background: #ffffff;
    color: #2d3748;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.mpd-search-group input[type="text"]:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    outline: none;
}

.mpd-filters-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: end;
}

.mpd-filter-item {
    flex: 1;
    min-width: 200px;
}

.mpd-filter-item label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #4a5568;
    font-size: 14px;
}

.mpd-filter-item select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    background: #ffffff;
    color: #2d3748;
    transition: border-color 0.2s ease-in-out;
}

.mpd-filter-item select:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    outline: none;
}

/* Buttons */
.mpd-button {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid #4299e1;
    border-radius: 6px;
    background: #4299e1;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.mpd-button:hover {
    background: #3182ce;
    border-color: #3182ce;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mpd-button-secondary {
    background: #f7fafc;
    border-color: #e2e8f0;
    color: #4a5568;
}

.mpd-button-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    color: #2d3748;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Loading States */
.mpd-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #fff;
    color: #646970;
}

.mpd-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.mpd-loading-state {
    opacity: 0.6;
    pointer-events: none;
}

/* Results Info */
.mpd-results-info {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e1e1;
    font-size: 14px;
    color: #646970;
    font-weight: 500;
}

/* Table Styles */
.mpd-table-responsive {
    overflow-x: auto;
}

.mpd-providers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}

.mpd-providers-table th,
.mpd-providers-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

.mpd-providers-table th {
    background: #f1f1f1;
    font-weight: 600;
    color: #1d2327;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mpd-providers-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.15s ease-in-out;
}

.mpd-providers-table th.sortable:hover {
    background: #e1e1e1;
}

.mpd-providers-table .sort-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #8c8f94;
}

.mpd-providers-table th.sort-asc .sort-arrow::after {
    content: "▲";
    color: #4299e1;
}

.mpd-providers-table th.sort-desc .sort-arrow::after {
    content: "▼";
    color: #4299e1;
}

.mpd-providers-table th.sortable .sort-arrow::after {
    content: "▲▼";
}

.mpd-providers-table tbody tr:hover {
    background: #f8f9fa;
}

.mpd-provider-name {
    font-weight: 600;
    color: #1d2327;
}

.mpd-provider-specialties {
    color: #0073aa;
    font-weight: 500;
}

.mpd-provider-phone a {
    color: #0073aa;
    text-decoration: none;
}

.mpd-provider-phone a:hover {
    text-decoration: underline;
}

/* Pagination */
.mpd-pagination-wrapper {
    padding: 20px 24px;
    background: #fafbfc;
    border-top: 1px solid #f0f0f0;
}

.mpd-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.mpd-pagination-link {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    transition: all 0.2s ease-in-out;
    min-width: 40px;
    text-align: center;
}

.mpd-pagination-link:hover {
    background: #f8fafc;
    border-color: #4299e1;
    color: #4299e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mpd-pagination-link.mpd-pagination-active {
    background: #4299e1;
    border-color: #4299e1;
    color: #ffffff;
    font-weight: 500;
}

.mpd-pagination-ellipsis {
    padding: 8px 4px;
    color: #a0aec0;
    font-family: 'Roboto', sans-serif;
}

/* No Results */
.mpd-no-results {
    padding: 60px 20px;
    text-align: center;
    background: #ffffff;
    color: #718096;
}

.mpd-no-results p {
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    margin: 0;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .mpd-providers-wrapper {
        margin: 10px 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .mpd-filters-section {
        padding: 15px;
    }
    
    .mpd-filters-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .mpd-filter-item {
        min-width: auto;
        width: 100%;
    }
    
    .mpd-search-group input[type="text"] {
        max-width: 100%;
    }
    
    /* Mobile Table Layout */
    .mpd-providers-table.mobile-view {
        display: block;
    }
    
    .mpd-providers-table.mobile-view thead {
        display: none;
    }
    
    .mpd-providers-table.mobile-view tbody {
        display: block;
    }
    
    .mpd-providers-table.mobile-view tr {
        display: block;
        border: 1px solid #f0f0f0;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 16px;
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }
    
    .mpd-providers-table.mobile-view td {
        display: block;
        border: none;
        padding: 5px 0;
        text-align: left;
        position: relative;
        padding-left: 40%;
    }
    
    .mpd-providers-table.mobile-view td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 5px;
        font-weight: 600;
        color: #1d2327;
        width: 35%;
    }
    
    /* Add data labels for mobile */
    .mpd-providers-table.mobile-view .mpd-provider-name:before {
        content: "Nombre: ";
    }
    
    .mpd-providers-table.mobile-view .mpd-provider-specialties:before {
        content: "Especialidades: ";
    }
    
    .mpd-providers-table.mobile-view .mpd-provider-address:before {
        content: "Dirección: ";
    }
    
    .mpd-providers-table.mobile-view .mpd-provider-phone:before {
        content: "Teléfono: ";
    }
    
    .mpd-providers-table.mobile-view .mpd-provider-location:before {
        content: "Localidad: ";
    }
    
    .mpd-providers-table.mobile-view .mpd-provider-license:before {
        content: "Matrícula: ";
    }
    
    .mpd-pagination {
        flex-wrap: wrap;
        gap: 3px;
    }
    
    .mpd-pagination-link {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 35px;
    }
}

@media (max-width: 480px) {
    .mpd-filters-section {
        padding: 10px;
    }
    
    .mpd-providers-table.mobile-view td {
        padding-left: 0;
        padding-bottom: 8px;
    }
    
    .mpd-providers-table.mobile-view td:before {
        position: relative;
        display: block;
        width: auto;
        margin-bottom: 3px;
        font-size: 12px;
    }
    
    .mpd-pagination-link {
        padding: 5px 6px;
        font-size: 11px;
        min-width: 30px;
    }
}

/* Print Styles */
@media print {
    .mpd-filters-section,
    .mpd-pagination-wrapper,
    .mpd-loading,
    .mpd-button {
        display: none !important;
    }
    
    .mpd-providers-table {
        font-size: 10px;
    }
    
    .mpd-providers-table th,
    .mpd-providers-table td {
        padding: 6px 4px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .mpd-spinner {
        animation: none;
    }
    
    .mpd-button,
    .mpd-pagination-link,
    .mpd-providers-table th.sortable {
        transition: none;
    }
}

/* Enhanced Light Theme Features */
.mpd-providers-wrapper * {
    box-sizing: border-box;
}

/* Smooth scroll behavior for pagination */
.mpd-providers-wrapper {
    scroll-behavior: smooth;
}

/* Enhanced focus states for better accessibility */
.mpd-button:focus,
.mpd-pagination-link:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

.mpd-search-group input[type="text"]:focus,
.mpd-filter-item select:focus {
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    border-color: #4299e1;
}

/* Subtle animations */
.mpd-providers-table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

/* Table cell improvements */
.mpd-providers-table td {
    color: #4a5568;
    line-height: 1.5;
}

/* Better visual hierarchy */
.mpd-provider-name {
    letter-spacing: -0.025em;
}

.mpd-provider-specialties {
    line-height: 1.4;
}

/* Improved mobile labels */
@media (max-width: 768px) {
    .mpd-providers-table.mobile-view td:before {
        color: #718096;
        font-weight: 500;
        font-size: 13px;
    }
}