/**
 * Betformatics Summary Shortcode Styles
 *
 * SEO-friendly summary box for article introductions.
 *
 * Dependencies: betformatics-variables (loaded via PHP)
 *
 * @package Betformatics
 */

/* =============================================================================
   RESET - Prevent theme interference
   ============================================================================= */
.bf-summary,
.bf-summary * {
    box-sizing: border-box;
}

/* =============================================================================
   BASE SUMMARY
   ============================================================================= */
.bf-summary {
    display: block;
    padding: 20px 24px;
    margin: 1.5em 0;
    border-radius: var(--bf-radius-lg, 12px);
    font-family: var(--bf-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    line-height: 1.6;
}

/* =============================================================================
   HIGHLIGHT STYLE (default) - Yellow accent
   ============================================================================= */
.bf-summary--highlight {
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%);
    border-left: 4px solid var(--bf-accent, #FFCC00);
    border-top: 1px solid rgba(255, 204, 0, 0.2);
    border-right: 1px solid rgba(255, 204, 0, 0.2);
    border-bottom: 1px solid rgba(255, 204, 0, 0.2);
}

.bf-summary--highlight .bf-summary__icon {
    color: var(--bf-accent, #FFCC00);
}

.bf-summary--highlight .bf-summary__title {
    color: #92400e;
}

/* =============================================================================
   INFO STYLE - Blue
   ============================================================================= */
.bf-summary--info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    border-right: 1px solid rgba(59, 130, 246, 0.2);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.bf-summary--info .bf-summary__icon {
    color: #3b82f6;
}

.bf-summary--info .bf-summary__title {
    color: #1e40af;
}

/* =============================================================================
   TIP STYLE - Green
   ============================================================================= */
.bf-summary--tip {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-left: 4px solid var(--bf-success, #10b981);
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    border-right: 1px solid rgba(16, 185, 129, 0.2);
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.bf-summary--tip .bf-summary__icon {
    color: var(--bf-success, #10b981);
}

.bf-summary--tip .bf-summary__title {
    color: #065f46;
}

/* =============================================================================
   CONTENT STRUCTURE
   ============================================================================= */
.bf-summary__content {
    display: block;
}

/* Header with icon and title on same line */
.bf-summary__header {
    display: block;
    line-height: 1.4;
}

/* Icon - inline with title */
.bf-summary__icon {
    display: inline-flex;
    vertical-align: middle;
    margin-right: 10px;
}

.bf-summary__icon svg {
    width: 24px;
    height: 24px;
}

/* Title */
.bf-summary__title {
    display: inline;
    vertical-align: middle;
    font-size: 1rem;
    font-weight: var(--bf-font-weight-bold, 700);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Text content */
.bf-summary__text {
    display: block;
    margin-top: 8px;
    color: var(--bf-text-primary, #1f2937);
    font-size: 1rem;
}

.bf-summary__text p {
    margin: 0 0 0.75em 0;
}

.bf-summary__text p:last-child {
    margin-bottom: 0;
}

.bf-summary__text strong {
    color: var(--bf-primary, #1a1a2e);
    font-weight: var(--bf-font-weight-semibold, 600);
}

.bf-summary__text a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: var(--bf-font-weight-medium, 500);
}

.bf-summary__text a:hover {
    text-decoration: underline;
}

.bf-summary__text ul,
.bf-summary__text ol {
    margin: 0.5em 0;
    padding-left: 1.25em;
}

.bf-summary__text li {
    margin-bottom: 0.35em;
}

/* When no header, remove top margin from text */
.bf-summary__content > .bf-summary__text:first-child {
    margin-top: 0;
}

/* =============================================================================
   MOBILE RESPONSIVE
   ============================================================================= */
@media (max-width: 768px) {
    .bf-summary {
        padding: 16px 18px;
        margin: 1em 0;
    }

    .bf-summary__icon svg {
        width: 22px;
        height: 22px;
    }

    .bf-summary__title {
        font-size: 0.9rem;
    }

    .bf-summary__text {
        font-size: 0.95rem;
    }
}

/* =============================================================================
   PAGE BUILDER COMPATIBILITY
   ============================================================================= */
.elementor-widget-container .bf-summary,
.elementor-element .bf-summary,
.wp-block .bf-summary {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
    .bf-summary,
    .bf-summary * {
        transition: none !important;
    }
}

/* =============================================================================
   THEME OVERRIDE PROTECTION
   ============================================================================= */
.bf-summary__text p,
.bf-summary__text ul,
.bf-summary__text ol,
.bf-summary__text li {
    color: var(--bf-text-primary, #1f2937) !important;
}
