/**
 * Diplomatic and Consular Relations Directory — Styles matching International Arbitrators
 */

.dcr-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;
    box-sizing: border-box;
}

.dcr-directory *,
.dcr-directory *::before,
.dcr-directory *::after {
    box-sizing: border-box;
}

/* Screen reader only */
.dcr-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Total Count Display */
.dcr-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);
}

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

/* Search Container */
.dcr-search-wrap {
    margin-bottom: 30px;
}

.dcr-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;
    background: #fff;
}

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

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

/* Table Container */
.dcr-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none; /* Removed the 1px border to match IAD shadow-only look */
}

/* Table Styles */
.dcr-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: #fff;
    min-width: 720px;
}

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

.dcr-table th {
    padding: 16px 20px;
    text-align: right;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0;
}

.dcr-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.dcr-table tbody tr:hover {
    background-color: #f8f9fa;
}

.dcr-table tbody tr:last-child {
    border-bottom: none;
}

.dcr-table td {
    padding: 20px;
    vertical-align: middle;
}

/* Photo Column */
.dcr-th-photo,
.dcr-td-photo {
    width: 120px;
    text-align: center;
}

.dcr-thumb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e0e0e0;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: inline-block;
}

.dcr-thumb:hover {
    transform: scale(1.05);
    border-color: #667eea;
}

.dcr-thumb-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 3px solid #e0e0e0;
    font-size: 40px;
    color: #fff;
}

/* Name and other columns */
.dcr-td-name strong {
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.dcr-td-rank,
.dcr-td-expiry {
    font-size: 15px;
    color: #555;
}

/* Expiry badge */
.dcr-expiry--bad {
    color: #d63638;
    font-weight: 600;
}

.dcr-badge-expired {
    background: rgba(102, 126, 234, 0.12);
    border: 1px solid rgba(102, 126, 234, 0.4);
    color: #4a56a6;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    margin-right: 8px;
    font-weight: 600;
}

/* Footer Hint */
.dcr-footer-hint {
    margin: 20px 0 0;
    font-size: 14px;
    color: #5a5a5a;
    background: #f8f8fb;
    border-right: 4px solid #667eea;
    padding: 12px 16px;
    border-radius: 6px;
}

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

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

/* Empty directory */
.dcr-directory--empty {
    padding: 40px 20px;
    text-align: center;
}

.dcr-empty-msg {
    color: #666;
    font-size: 16px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .dcr-directory {
        padding: 16px 12px;
    }

    .dcr-total-count {
        font-size: 15px;
        padding: 12px 16px;
    }

    .dcr-search-input {
        max-width: 100%;
        padding: 12px 16px;
    }

    .dcr-table th,
    .dcr-table td {
        padding: 14px 12px;
        font-size: 15px;
    }

    .dcr-th-photo,
    .dcr-td-photo {
        width: 90px;
        min-width: 90px;
    }

    .dcr-thumb,
    .dcr-thumb-placeholder {
        width: 56px;
        height: 56px;
    }
    
    .dcr-thumb-placeholder {
        font-size: 28px;
    }

    .dcr-td-name strong {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .dcr-directory {
        padding: 12px 10px;
    }

    .dcr-table th {
        font-size: 13px;
        padding: 10px 10px;
    }

    .dcr-table td {
        padding: 12px 10px;
        font-size: 14px;
    }

    .dcr-th-photo,
    .dcr-td-photo {
        width: 72px;
        min-width: 72px;
    }

    .dcr-thumb,
    .dcr-thumb-placeholder {
        width: 48px;
        height: 48px;
    }

    .dcr-thumb-placeholder {
        font-size: 24px;
    }
}

/* Rows hidden by live filter */
.dcr-row.dcr-is-hidden {
    display: none !important;
}

