/**
 * Article Reviewer - Frontend Styles
 * Glassy banner design with curved edges
 */

.mar-verification-banner {
    margin: 30px 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 5px rgb(0 0 0 / 10%);
    background: rgb(189 255 222 / 23%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgb(0 0 0 / 20%);
    transition: all 0.3s ease;
    max-width: 50%;
}

.mar-verification-banner:hover {
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.mar-banner-header {
    padding: 10px 30px;
    position: relative;
}

.mar-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Default order for LTR: Text, Thumbnails, Button */
.mar-banner-text {
    order: 1;
    flex: 1;
    min-width: 200px;
}

.mar-banner-text p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.5;
}

.mar-verifiers-thumbnails {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    order: 2;
}

.mar-verifier-thumbnail {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Desktop: Show all thumbnails with overlapping */
.mar-verifiers-thumbnails .mar-verifier-thumbnail:not(:first-child) {
    margin-left: -12px;
}

.mar-verifier-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mar-reviewer-count-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #ff6b6b;
    color: #ffffff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: none; /* Hidden on desktop by default */
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1;
    z-index: 10;
}

.mar-expand-button {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1a1a1a;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    order: 3;
}

.mar-expand-button:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
    color: #1a1a1a;
}

.mar-expand-button:hover svg {
    color: #1a1a1a;
}

.mar-expand-button:hover svg path {
    stroke: currentColor;
}

.mar-expand-button.active {
    transform: rotate(180deg);
    color: #1a1a1a;
}

.mar-expand-button svg {
    opacity: 1;
    transition: transform 0.3s ease;
    display: block;
    color: #1a1a1a;
}

.mar-expand-button svg path {
    stroke: currentColor;
    fill: none;
}

.mar-expand-button.active svg {
    transform: rotate(180deg);
    color: #1a1a1a;
}

.mar-expand-button.active svg path {
    stroke: currentColor;
}

.mar-banner-details {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 24px;
    background: rgba(255, 255, 255, 0.5);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mar-verifiers-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mar-verifier-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.mar-verifier-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(4px);
}

.mar-verifier-item.mar-verifier-hidden {
    display: none;
}

.mar-verifier-item.mar-verifier-visible {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.mar-verifier-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mar-verifier-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mar-verifier-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mar-verifier-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.mar-verifier-name a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mar-verifier-name a:hover {
    color: #0066cc;
    text-decoration: underline;
}

.mar-verifier-specialty {
    margin: 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.mar-verifier-date {
    margin: 0;
    font-size: 13px;
    color: #888;
}

.mar-show-more-button {
    margin-top: 20px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.mar-show-more-button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mar-banner-content {
        gap: 6px;
    }

    .mar-verification-banner {
        max-width: 100%;
    }
    .mar-verifier-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .mar-verifiers-thumbnails {
        gap: 0;
    }
    
    /* Mobile: Hide additional thumbnails when count badge is shown */
    .mar-verifiers-thumbnails .mar-verifier-thumbnail:not(:first-child) {
        display: none;
    }
    
    /* Mobile: Show count badge */
    .mar-reviewer-count-badge {
        display: flex;
    }
    
    .mar-banner-text p {
        font-size: 14px;
    }
    
    .mar-banner-header {
        padding: 10px 20px;
    }
    
    .mar-banner-details {
        padding: 20px;
    }
    
    .mar-verifier-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .mar-verifier-image {
        width: 60px;
        height: 60px;
    }
    
    .mar-verifier-name {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    
    /* RTL responsive adjustments */
    html[dir="rtl"] .mar-verifier-item,
    .mar-verification-banner[dir="rtl"] .mar-verifier-item {
        flex-direction: column;
        text-align: center;
    }
    
    html[dir="rtl"] .mar-verifier-image,
    .mar-verification-banner[dir="rtl"] .mar-verifier-image {
        margin-left: 0;
        margin-right: 0;
    }
}

/* RTL (Right-to-Left) Support for Arabic/Persian */
html[dir="rtl"] .mar-verification-banner,
.mar-verification-banner[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] .mar-banner-content,
.mar-verification-banner[dir="rtl"] .mar-banner-content {
    flex-direction: row-reverse;
}

html[dir="rtl"] .mar-banner-text,
.mar-verification-banner[dir="rtl"] .mar-banner-text {
    text-align: right;
}

/* RTL: Expand button on the left */
html[dir="rtl"] .mar-expand-button,
.mar-verification-banner[dir="rtl"] .mar-expand-button {
    order: -1;
    transform: scaleX(-1);
}

html[dir="rtl"] .mar-expand-button.active,
.mar-verification-banner[dir="rtl"] .mar-expand-button.active {
    transform: scaleX(-1) rotate(180deg);
    color: #1a1a1a;
}

html[dir="rtl"] .mar-expand-button.active svg,
.mar-verification-banner[dir="rtl"] .mar-expand-button.active svg {
    color: #1a1a1a;
}

html[dir="rtl"] .mar-expand-button.active svg path,
.mar-verification-banner[dir="rtl"] .mar-expand-button.active svg path {
    stroke: currentColor;
}

html[dir="rtl"] .mar-expand-button.active svg,
.mar-verification-banner[dir="rtl"] .mar-expand-button.active svg {
    color: #1a1a1a;
}

html[dir="rtl"] .mar-expand-button.active svg path,
.mar-verification-banner[dir="rtl"] .mar-expand-button.active svg path {
    stroke: currentColor;
}

/* RTL: Thumbnails on the right (where expand button was) */
html[dir="rtl"] .mar-verifiers-thumbnails,
.mar-verification-banner[dir="rtl"] .mar-verifiers-thumbnails {
    order: 1;
}

html[dir="rtl"] .mar-verifier-thumbnail:not(:first-child),
.mar-verification-banner[dir="rtl"] .mar-verifier-thumbnail:not(:first-child) {
    margin-left: 0;
    margin-right: -12px;
}

/* RTL: Mobile adjustments for count badge */
@media (max-width: 768px) {
    html[dir="rtl"] .mar-verifier-thumbnail:not(:first-child),
    .mar-verification-banner[dir="rtl"] .mar-verifier-thumbnail:not(:first-child) {
        display: none;
    }
    
    html[dir="rtl"] .mar-reviewer-count-badge,
    .mar-verification-banner[dir="rtl"] .mar-reviewer-count-badge {
        right: auto;
        left: -4px;
    }
}

html[dir="rtl"] .mar-verifier-item,
.mar-verification-banner[dir="rtl"] .mar-verifier-item {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .mar-verifier-item:hover,
.mar-verification-banner[dir="rtl"] .mar-verifier-item:hover {
    transform: translateX(-4px);
}

html[dir="rtl"] .mar-verifier-image,
.mar-verification-banner[dir="rtl"] .mar-verifier-image {
    margin-left: 0;
    margin-right: 0;
}

html[dir="rtl"] .mar-verifier-info,
.mar-verification-banner[dir="rtl"] .mar-verifier-info {
    text-align: right;
}

html[dir="rtl"] .mar-verifier-name,
.mar-verification-banner[dir="rtl"] .mar-verifier-name {
    text-align: right;
}

html[dir="rtl"] .mar-verifier-specialty,
.mar-verification-banner[dir="rtl"] .mar-verifier-specialty {
    text-align: right;
}

html[dir="rtl"] .mar-verifier-date,
.mar-verification-banner[dir="rtl"] .mar-verifier-date {
    text-align: right;
}

/* Print Styles */
@media print {
    .mar-verification-banner {
        background: #fff;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .mar-expand-button,
    .mar-show-more-button {
        display: none;
    }
    
    .mar-banner-details {
        display: block !important;
    }
    
    .mar-verifier-item.mar-verifier-hidden {
        display: flex !important;
    }
}

