/* Стилі для фронтенд відображення безоплатних ліків */

.fmp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fmp-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.fmp-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 300;
}

.fmp-last-update {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Таби */
.fmp-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 5px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.fmp-tab {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    white-space: nowrap;
    min-width: 150px;
}

.fmp-tab:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.fmp-tab.active {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Пошук - YooTheme стилі */
.fmp-search {
    margin-bottom: 30px;
}

.fmp-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.fmp-search-input {
    flex: 1;
    min-width: 300px;
    height: 48px;
    padding-left: 15px;
    padding-right: 15px;
    background: #fff;
    border: 2px solid #e7e8ea;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.fmp-search-input:focus {
    background-color: #f9fbfc;
    border-color: #dadde2;
    outline: none;
}

.fmp-search-button {
    padding: 12px 25px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    height: 48px;
}

.fmp-search-button:hover {
    background: #5a6fd8;
}

.fmp-clear-search {
    padding: 12px 20px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1em;
    transition: background 0.3s ease;
    height: 48px;
    display: inline-flex;
    align-items: center;
}

.fmp-clear-search:hover {
    background: #5a6268;
    color: white;
    text-decoration: none;
}

/* Селектор кількості записів */
.fmp-per-page-selector {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fmp-per-page-selector label {
    font-weight: 500;
    color: #495057;
}

.fmp-per-page-selector select {
    padding: 8px 12px;
    border: 2px solid #e7e8ea;
    border-radius: 8px;
    background: #fff;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.fmp-per-page-selector select:focus {
    outline: none;
    border-color: #1e87f0;
    box-shadow: 0 0 0 3px rgba(30, 135, 240, 0.1);
}

/* Завантаження */
.fmp-loading {
    text-align: center;
    padding: 40px;
}

.fmp-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Результати */
.fmp-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-weight: 500;
}

.fmp-table-container {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.fmp-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95em;
}

.fmp-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.fmp-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fmp-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.fmp-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.fmp-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.fmp-table tbody tr:nth-child(even):hover {
    background: rgba(102, 126, 234, 0.08);
}

/* Пагінація - YooTheme стилі */
.fmp-pagination {
    margin: 30px 0;
    text-align: center;
}

.fmp-pagination ul {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fmp-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: white;
    color: #333;
    text-decoration: none;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 40px;
}

.fmp-page-link:hover {
    background: #f8f9fa;
    border-color: #ddd;
    text-decoration: none;
    color: #333;
}

.fmp-page-link.fmp-current {
    background: #1e87f0;
    color: white;
    border-color: #1e87f0;
}

.fmp-page-dots {
    padding: 8px 5px;
    color: #999;
    font-weight: 500;
}

.fmp-prev,
.fmp-next {
    font-weight: 600;
}

.fmp-prev svg,
.fmp-next svg {
    width: 7px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.2;
}

/* Немає результатів */
.fmp-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.fmp-no-results p {
    font-size: 1.2em;
    margin: 10px 0;
}

/* Адаптивність */
@media (max-width: 768px) {
    .fmp-container {
        padding: 10px;
    }
    
    .fmp-header h2 {
        font-size: 2em;
    }
    
    .fmp-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .fmp-tab {
        min-width: auto;
    }
    
    .fmp-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .fmp-search-input {
        min-width: auto;
    }
    
    .fmp-results-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .fmp-table {
        font-size: 0.85em;
    }
    
    .fmp-table th,
    .fmp-table td {
        padding: 8px 6px;
    }
    
    .fmp-pagination {
        gap: 3px;
    }
    
    .fmp-page-link {
        padding: 8px 12px;
        min-width: 40px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .fmp-header {
        padding: 15px;
    }
    
    .fmp-header h2 {
        font-size: 1.8em;
    }
    
    .fmp-table th,
    .fmp-table td {
        padding: 6px 4px;
        font-size: 0.8em;
    }
    
    .fmp-page-link {
        padding: 6px 10px;
        min-width: 35px;
        font-size: 0.85em;
    }
}

/* Анімації */
.fmp-content {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.fmp-content.loading {
    opacity: 0.7;
}

/* Стилі для YooTheme сумісності */
.yoo-theme .fmp-container {
    font-family: inherit;
}

.yoo-theme .fmp-header {
    background: var(--uk-primary, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
}

.yoo-theme .fmp-tab.active {
    background: var(--uk-primary, #667eea);
}

.yoo-theme .fmp-search-button {
    background: var(--uk-primary, #667eea);
}

.yoo-theme .fmp-page-link.fmp-current {
    background: var(--uk-primary, #667eea);
}

/* Стилі під сайт unci.org.ua */
.fmp-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.fmp-header {
    background: linear-gradient(135deg, #1e87f0 0%, #0f4c75 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(30, 135, 240, 0.15);
}

.fmp-tab {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s ease;
}

.fmp-tab:hover {
    background: #e9ecef;
    border-color: #1e87f0;
    color: #1e87f0;
}

.fmp-tab.active {
    background: #1e87f0;
    border-color: #1e87f0;
    color: white;
    box-shadow: 0 4px 12px rgba(30, 135, 240, 0.3);
}

.fmp-search-input {
    border: 2px solid #e7e8ea;
    background: #fff;
    transition: all 0.3s ease;
}

.fmp-search-input:focus {
    border-color: #1e87f0;
    background-color: #f8f9ff;
    box-shadow: 0 0 0 3px rgba(30, 135, 240, 0.1);
}

.fmp-search-button {
    background: #1e87f0;
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.fmp-search-button:hover {
    background: #0f4c75;
    transform: translateY(-1px);
}

.fmp-table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.fmp-table thead {
    background: linear-gradient(135deg, #1e87f0 0%, #0f4c75 100%);
    color: white;
}

.fmp-table th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85em;
}

.fmp-table tbody tr:hover {
    background: rgba(30, 135, 240, 0.05);
    transform: scale(1.01);
}

.fmp-pagination .uk-pagination li a {
    color: #495057;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.fmp-pagination .uk-pagination li a:hover {
    background: #1e87f0;
    color: white;
    border-color: #1e87f0;
}

.fmp-pagination .uk-pagination li.uk-active span {
    background: #1e87f0;
    color: white;
    border-color: #1e87f0;
}
