/**
 * Betformatics Pros/Cons Shortcode Styles
 *
 * Styled comparison box for pros and cons lists.
 *
 * Dependencies: betformatics-variables (loaded via PHP)
 *
 * @package Betformatics
 */

/* =============================================================================
   RESET - Prevent theme interference
   ============================================================================= */
.bf-pros-cons,
.bf-pros-cons * {
    box-sizing: border-box;
}

/* =============================================================================
   CONTAINER
   ============================================================================= */
.bf-pros-cons {
    display: flex;
    gap: 20px;
    margin: 1.5em 0;
    font-family: var(--bf-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/* Side-by-side layout (default) */
.bf-pros-cons--side {
    flex-direction: row;
}

/* Stacked layout */
.bf-pros-cons--stack {
    flex-direction: column;
}

/* =============================================================================
   COLUMNS
   ============================================================================= */
.bf-pros-cons__column {
    flex: 1;
    min-width: 0;
    border-radius: var(--bf-radius-lg, 10px);
    overflow: hidden;
    border: 1px solid var(--bf-border, #e0e0e0);
    background: var(--bf-white, #ffffff);
}

/* =============================================================================
   HEADERS
   ============================================================================= */
.bf-pros-cons__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    font-weight: var(--bf-font-weight-semibold, 600);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Pros header - green gradient */
.bf-pros-cons__header--pros {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border-bottom: 2px solid var(--bf-success, #10b981);
}

/* Cons header - red gradient */
.bf-pros-cons__header--cons {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border-bottom: 2px solid var(--bf-error, #ef4444);
}

/* =============================================================================
   ICON
   ============================================================================= */
.bf-pros-cons__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bf-pros-cons__icon svg {
    width: 20px;
    height: 20px;
}

/* =============================================================================
   TITLE
   ============================================================================= */
.bf-pros-cons__title {
    line-height: 1.2;
}

/* =============================================================================
   LIST
   ============================================================================= */
.bf-pros-cons__list {
    list-style: none;
    margin: 0;
    padding: 16px 18px;
    background: var(--bf-white, #ffffff);
}

.bf-pros-cons__list li {
    position: relative;
    padding: 8px 0 8px 28px;
    margin: 0 !important;
    line-height: 1.5;
    color: var(--bf-text-primary, #333333);
    border-bottom: 1px solid var(--bf-gray-100, #f0f0f0);
}

.bf-pros-cons__list li:last-child {
    border-bottom: none;
}

/* List item icons */
.bf-pros-cons__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
}

/* Pros checkmark icon - green */
.bf-pros-cons__list--pros li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2310b981'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
}

/* Cons X icon - red */
.bf-pros-cons__list--cons li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ef4444'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
}

/* =============================================================================
   MOBILE RESPONSIVE
   ============================================================================= */
@media (max-width: 640px) {
    /* Stack on mobile even if side layout is set */
    .bf-pros-cons--side {
        flex-direction: column;
    }

    .bf-pros-cons {
        gap: 16px;
    }

    .bf-pros-cons__header {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .bf-pros-cons__list {
        padding: 12px 14px;
    }

    .bf-pros-cons__list li {
        padding: 6px 0 6px 26px;
        font-size: 0.95rem;
    }

    .bf-pros-cons__list li::before {
        top: 10px;
        width: 16px;
        height: 16px;
    }
}

/* =============================================================================
   PAGE BUILDER COMPATIBILITY
   ============================================================================= */
.elementor-widget-container .bf-pros-cons,
.elementor-element .bf-pros-cons,
.wp-block .bf-pros-cons {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
    .bf-pros-cons,
    .bf-pros-cons * {
        transition: none !important;
    }
}
