/**
 * Pros and Cons Block - Frontend Styles
 * 
 * @package Pros_Cons_Block
 * @version 1.0.0
 */

/* ================================
   Google Font Import (Fallback)
   ================================ */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700&display=swap');

/* ================================
   CSS Custom Properties
   ================================ */
.pros-cons-block-wrapper {
    --pros-color: #10b981;
    --cons-color: #ef4444;
    --pros-bg: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    --cons-bg: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    --verdict-bg: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --spacing-xs: 6px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 28px;
    --spacing-xl: 36px;
    --font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ================================
   Main Wrapper
   ================================ */
.pros-cons-block-wrapper {
    font-family: var(--font-family);
    direction: rtl;
    text-align: right;
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-lg);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

/* Decorative background pattern */
.pros-cons-block-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--pros-color) 0%, var(--pros-color) 50%, var(--cons-color) 50%, var(--cons-color) 100%);
}

/* ================================
   Container
   ================================ */
.pros-cons-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

@media (max-width: 768px) {
    .pros-cons-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* ================================
   Column Styles
   ================================ */
.pros-cons-column {
    background: #ffffff;
    border-radius: var(--border-radius-sm);
    padding: 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.pros-cons-column:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* Pros Column */
.pros-column {
    border-top: 5px solid var(--pros-color);
}

.pros-column .column-header {
    background: var(--pros-bg);
}

.pros-column .header-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #059669;
}

/* Cons Column */
.cons-column {
    border-top: 5px solid var(--cons-color);
}

.cons-column .column-header {
    background: var(--cons-bg);
}

.cons-column .header-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

/* ================================
   Column Header
   ================================ */
.column-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.column-header .header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.pros-cons-column:hover .header-icon {
    transform: scale(1.1) rotate(-5deg);
}

.column-header .column-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.025em;
}

/* ================================
   Items List
   ================================ */
.items-list {
    list-style: none;
    margin: 0;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

/* ================================
   List Item
   ================================ */
.list-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

/* Hover effect background */
.list-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left var(--transition-normal);
    z-index: 0;
}

.pros-item::before {
    background: linear-gradient(90deg, transparent 0%, rgba(16, 185, 129, 0.08) 100%);
}

.cons-item::before {
    background: linear-gradient(90deg, transparent 0%, rgba(239, 68, 68, 0.08) 100%);
}

.has-animations .list-item:hover::before {
    left: 0;
}

.has-animations .list-item:hover {
    transform: translateX(-8px);
    border-color: currentColor;
}

.pros-item:hover {
    border-color: rgba(16, 185, 129, 0.3);
}

.cons-item:hover {
    border-color: rgba(239, 68, 68, 0.3);
}

/* Item Icon */
.list-item .item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-fast);
}

.has-animations .list-item:hover .item-icon {
    transform: scale(1.15);
}

.pros-item .item-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.cons-item .item-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* Item Text */
.list-item .item-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    position: relative;
    z-index: 1;
}

/* ================================
   Entrance Animations
   ================================ */
.has-animations .list-item {
    opacity: 0;
    animation: slideInItem 0.4s ease forwards;
}

@keyframes slideInItem {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ================================
   Verdict Section
   ================================ */
.verdict-section {
    margin-top: var(--spacing-lg);
    background: var(--verdict-bg);
    border-radius: var(--border-radius-sm);
    border: 2px solid #fde047;
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Decorative corner accent */
.verdict-section::before {
    content: '✦';
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 24px;
    color: #f59e0b;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.2) rotate(180deg); 
        opacity: 0.7; 
    }
}

.verdict-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px dashed rgba(217, 119, 6, 0.2);
}

.verdict-header .verdict-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #fef08a 0%, #fde047 100%);
    border-radius: 50%;
    color: #a16207;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.verdict-header .verdict-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #92400e;
    letter-spacing: -0.025em;
}

.verdict-content {
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.verdict-content p {
    margin: 0;
    font-size: 15px;
    line-height: 1.9;
    color: #78350f;
}

/* ================================
   RTL & LTR Support
   ================================ */
[dir="rtl"] .pros-cons-block-wrapper,
.rtl .pros-cons-block-wrapper,
:lang(fa) .pros-cons-block-wrapper,
:lang(ar) .pros-cons-block-wrapper {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .has-animations .list-item:hover,
.rtl .has-animations .list-item:hover {
    transform: translateX(8px);
}

[dir="ltr"] .pros-cons-block-wrapper {
    direction: ltr;
    text-align: left;
}

[dir="ltr"] .pros-cons-container {
    grid-template-columns: 1fr 1fr;
}

[dir="ltr"] .pros-column {
    order: 1;
}

[dir="ltr"] .cons-column {
    order: 2;
}

/* RTL: Pros on Right, Cons on Left */
[dir="rtl"] .pros-column,
.rtl .pros-column {
    order: 1;
}

[dir="rtl"] .cons-column,
.rtl .cons-column {
    order: 2;
}

/* ================================
   Responsive Adjustments
   ================================ */
@media (max-width: 768px) {
    .pros-cons-block-wrapper {
        padding: var(--spacing-md);
        margin: var(--spacing-lg) 0;
        border-radius: 16px;
    }

    .column-header {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .column-header .header-icon {
        width: 38px;
        height: 38px;
    }

    .column-header .column-title {
        font-size: 17px;
    }

    .list-item {
        padding: var(--spacing-sm);
    }

    .list-item .item-text {
        font-size: 14px;
    }

    .verdict-section {
        padding: var(--spacing-md);
    }

    .verdict-header .verdict-icon {
        width: 40px;
        height: 40px;
    }

    .verdict-header .verdict-title {
        font-size: 17px;
    }

    /* Stack columns on mobile */
    .pros-column {
        order: 1;
    }

    .cons-column {
        order: 2;
    }
}

@media (max-width: 480px) {
    .pros-cons-block-wrapper {
        padding: var(--spacing-sm);
    }

    .items-list {
        padding: var(--spacing-sm);
    }
}

/* ================================
   Print Styles
   ================================ */
@media print {
    .pros-cons-block-wrapper {
        box-shadow: none;
        border: 2px solid #e2e8f0;
    }

    .pros-cons-column {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .has-animations .list-item {
        animation: none;
        opacity: 1;
    }

    .verdict-section::before {
        display: none;
    }
}

/* ================================
   High Contrast Mode
   ================================ */
@media (prefers-contrast: high) {
    .pros-cons-block-wrapper {
        border-width: 3px;
    }

    .list-item {
        border-width: 2px;
    }

    .pros-item .item-icon,
    .cons-item .item-icon {
        border: 2px solid currentColor;
    }
}

/* ================================
   Reduced Motion
   ================================ */
@media (prefers-reduced-motion: reduce) {
    .pros-cons-block-wrapper,
    .pros-cons-column,
    .list-item,
    .list-item::before,
    .list-item .item-icon,
    .column-header .header-icon {
        transition: none;
        animation: none;
    }

    .has-animations .list-item {
        opacity: 1;
        animation: none;
    }

    .verdict-section::before {
        animation: none;
    }
}

/* ================================
   Dark Mode Support
   ================================ */
@media (prefers-color-scheme: dark) {
    .pros-cons-block-wrapper {
        background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
        border-color: #334155;
    }

    .pros-cons-column {
        background: #1e293b;
        border-color: #334155;
    }

    .pros-column .column-header {
        background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    }

    .cons-column .column-header {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    }

    .column-header .column-title {
        color: #f1f5f9;
    }

    .list-item {
        background: #334155;
    }

    .list-item .item-text {
        color: #cbd5e1;
    }

    .verdict-section {
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
        border-color: #b45309;
    }

    .verdict-header .verdict-title,
    .verdict-content p {
        color: #fbbf24;
    }

    .verdict-content {
        background: rgba(0, 0, 0, 0.2);
    }
}