/**
 * Research Members Directory - Styles
 */

.rmd-research-directory {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", "Cairo", "Tajawal", sans-serif;
    direction: rtl;
    text-align: right;
}

/* Search Container */
.rmd-search-container {
    margin-bottom: 30px;
}

.rmd-search-input {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
}

.rmd-search-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.rmd-search-input::placeholder {
    color: #999;
}

/* Papers Container */
.rmd-papers-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Research Item */
.rmd-research-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
    transition: box-shadow 0.3s ease;
}

.rmd-research-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rmd-research-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.rmd-research-title {
    font-size: 22px;
    color: #333;
    font-weight: 600;
    margin: 0 0 10px 0;
    text-align: right;
    direction: rtl;
    line-height: 1.4;
}

.rmd-researcher-name {
    font-size: 16px;
    color: #666;
    margin-top: 10px;
}

.rmd-researcher-name strong {
    color: #333;
    font-weight: 600;
}

/* PDF Actions (Button) */
.rmd-pdf-actions {
    margin-top: 20px;
    text-align: right;
}

.toggle-pdf {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    font-family: inherit;
    direction: rtl;
    text-align: right;
}

.toggle-pdf:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.toggle-pdf:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.toggle-pdf.active {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.toggle-pdf-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.toggle-pdf.active .toggle-pdf-icon {
    transform: rotate(180deg);
}

/* PDF Container */
.rmd-pdf-container {
    margin-top: 20px;
    width: 100%;
}

.rmd-pdf-wrapper {
    position: relative;
    width: 100%;
    min-height: 600px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.rmd-pdf-wrapper iframe {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: none;
    display: block;
}

.rmd-pdf-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    min-height: 600px;
}

.rmd-pdf-loading {
    text-align: center;
    color: #666;
}

.rmd-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

.rmd-pdf-loading p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

.rmd-no-pdf {
    padding: 20px;
    text-align: center;
    color: #999;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

.rmd-no-pdf p {
    margin: 0;
    font-size: 14px;
}

/* No Results Message */
.rmd-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rmd-no-results p {
    margin: 0;
}

/* No Papers Message */
.rmd-no-papers {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Hidden Items */
.rmd-research-item.hidden {
    display: none;
}

/* Total Count Display */
.rmd-total-count {
    margin-bottom: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    text-align: right;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rmd-total-count strong {
    font-weight: 600;
}

/* Pagination */
.rmd-pagination {
    margin-top: 30px;
    text-align: center;
    direction: rtl;
    padding: 20px 0;
}

.rmd-pagination a,
.rmd-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    background: #fff;
    transition: all 0.2s ease;
    min-width: 36px;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.rmd-pagination a:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

.rmd-pagination .current {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
    font-weight: 600;
    cursor: default;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.rmd-pagination .prev,
.rmd-pagination .next {
    font-weight: 600;
    padding: 8px 16px;
}

.rmd-pagination .dots {
    border: none;
    background: transparent;
    color: #999;
    cursor: default;
    padding: 8px 4px;
    box-shadow: none;
}

.rmd-pagination .dots:hover {
    background: transparent;
    color: #999;
    border-color: transparent;
    transform: none;
    box-shadow: none;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .rmd-research-directory {
        padding: 15px;
    }
    
    .rmd-search-input {
        font-size: 14px;
        padding: 10px 16px;
    }
    
    .rmd-research-item {
        padding: 20px;
    }
    
    .rmd-research-title {
        font-size: 18px;
    }
    
    .rmd-researcher-name {
        font-size: 14px;
    }
    
    .toggle-pdf {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .rmd-pdf-wrapper {
        min-height: 500px;
    }
    
    .rmd-pdf-wrapper iframe {
        min-height: 500px;
    }
    
    .rmd-pdf-placeholder {
        min-height: 500px;
    }
    
    .rmd-total-count {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .rmd-pagination a,
    .rmd-pagination span {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 32px;
        margin: 0 2px;
    }
    
    .rmd-pagination .prev,
    .rmd-pagination .next {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media screen and (max-width: 480px) {
    .rmd-research-directory {
        padding: 10px;
    }
    
    .rmd-search-container {
        margin-bottom: 20px;
    }
    
    .rmd-research-item {
        padding: 15px;
    }
    
    .rmd-research-title {
        font-size: 16px;
    }
    
    .rmd-researcher-name {
        font-size: 13px;
    }
    
    .toggle-pdf {
        padding: 8px 16px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
    
    .rmd-pdf-wrapper {
        min-height: 400px;
    }
    
    .rmd-pdf-wrapper iframe {
        min-height: 400px;
    }
    
    .rmd-pdf-placeholder {
        min-height: 400px;
    }
}


