/* AI Card Smart Linker v2.1 - Frontend Styles */
/* Black & White Design - UI/UX Optimized */
/* Compatible with WoodMart, WooCommerce, LiteSpeed, Rank Math, Elementor */
/* Uses site default font - no external font loading */

.aicard-smart-box {
    --aicard-bg: #ffffff;
    --aicard-border: #e0e0e0;
    --aicard-text: #111111;
    --aicard-text-secondary: #555555;
    --aicard-hover: #f8f8f8;
    --aicard-radius: 16px;
    --aicard-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
    --aicard-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --aicard-accent: #000000;

    background: var(--aicard-bg);
    border: 1px solid var(--aicard-border);
    border-radius: var(--aicard-radius);
    box-shadow: var(--aicard-shadow);
    padding: 22px 26px;
    margin: 32px 0;
    max-width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    direction: rtl;
    position: relative;
    overflow: hidden;
}

.aicard-smart-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: #000000;
    opacity: 0.08;
}

/* Header */
.aicard-smart-box__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eeeeee;
}

.aicard-smart-box__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #000000;
    border-radius: 8px;
    color: #ffffff;
    flex-shrink: 0;
}

.aicard-smart-box__icon svg {
    width: 16px;
    height: 16px;
}

.aicard-smart-box__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--aicard-text);
    letter-spacing: 0;
    line-height: 1.4;
}

/* Links Container */
.aicard-smart-box__links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Individual Link */
.aicard-smart-box__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    background: #fafafa;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    text-decoration: none !important;
    color: var(--aicard-text) !important;
    transition: var(--aicard-transition);
    position: relative;
    overflow: hidden;
}

.aicard-smart-box__link::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: rgba(0, 0, 0, 0.02);
    transition: width 0.25s ease;
}

.aicard-smart-box__link:hover {
    background: #ffffff;
    border-color: #cccccc;
    transform: translateX(-2px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}

.aicard-smart-box__link:hover::after {
    width: 100%;
}

.aicard-smart-box__link:active {
    transform: translateX(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.aicard-smart-box__link-text {
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    color: #222222;
}

/* Arrow - points LEFT for RTL */
.aicard-smart-box__link-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 50%;
    color: #999999;
    transition: var(--aicard-transition);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.aicard-smart-box__link:hover .aicard-smart-box__link-arrow {
    background: #000000;
    border-color: #000000;
    color: #ffffff;
    transform: translateX(-2px);
}

.aicard-smart-box__link:active .aicard-smart-box__link-arrow {
    transform: translateX(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .aicard-smart-box {
        padding: 18px 20px;
        margin: 24px 0;
        border-radius: 14px;
    }
    .aicard-smart-box__link {
        padding: 11px 14px;
        border-radius: 10px;
    }
    .aicard-smart-box__title {
        font-size: 13px;
    }
    .aicard-smart-box__link-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .aicard-smart-box {
        padding: 16px 18px;
        border-radius: 12px;
    }
    .aicard-smart-box__link {
        padding: 10px 12px;
        border-radius: 10px;
    }
    .aicard-smart-box__link-arrow {
        width: 22px;
        height: 22px;
    }
    .aicard-smart-box__link-arrow svg {
        width: 11px;
        height: 11px;
    }
}

/* WoodMart Compatibility */
.wd-content .aicard-smart-box,
.whb-content .aicard-smart-box,
.wd-main-content .aicard-smart-box {
    margin-right: 0;
    margin-left: 0;
}

/* Elementor Compatibility */
.elementor-widget-theme-post-content .aicard-smart-box,
.elementor-widget-text-editor .aicard-smart-box {
    max-width: 100%;
}

/* WooCommerce Compatibility */
.woocommerce .aicard-smart-box {
    clear: both;
}

/* LiteSpeed Cache Compatibility */
.litespeed_container .aicard-smart-box,
.lsow-container .aicard-smart-box {
    contain: layout style;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .aicard-smart-box {
        --aicard-bg: #1a1a1a;
        --aicard-border: #2a2a2a;
        --aicard-text: #f0f0f0;
        --aicard-text-secondary: #aaaaaa;
        --aicard-hover: #222222;
        --aicard-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
        --aicard-accent: #f0f0f0;
    }
    .aicard-smart-box__link {
        background: #1e1e1e;
        border-color: #2a2a2a;
    }
    .aicard-smart-box__link:hover {
        background: #222222;
        border-color: #444444;
    }
    .aicard-smart-box__link-arrow {
        background: #1a1a1a;
        border-color: #333333;
        color: #888888;
    }
    .aicard-smart-box__link:hover .aicard-smart-box__link-arrow {
        background: #f0f0f0;
        border-color: #f0f0f0;
        color: #000000;
    }
}

/* Rank Math - ensure links are crawlable */
.aicard-smart-box__link[rel="nofollow"] {
    opacity: 0.7;
}

/* Print styles */
@media print {
    .aicard-smart-box {
        box-shadow: none;
        border: 1px solid #cccccc;
    }
}
