/**
 * Tips Box Component
 * Pro tips and help information display
 */

@use '../variables' as *;
@use '../mixins' as *;

.target-conditions-trait,
.entity-selector-trait {

    // Tips box container
    .target-tips-box {
        margin: $es-spacing-lg $es-spacing-md $es-spacing-md;
        border: 1px solid $es-border-color;
        border-radius: $es-radius-lg;
        overflow: hidden;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    }

    // Tips header (clickable to expand/collapse)
    .tips-header {
        display: flex;
        align-items: center;
        gap: 0.625rem;
        padding: $es-spacing-md $es-spacing-lg;
        cursor: pointer;
        user-select: none;
        transition: background-color $es-transition-fast;

        &:hover {
            background: rgba(0, 0, 0, 0.02);
        }

        // Lightbulb icon
        > i:first-child {
            font-size: 1rem;
            color: $es-warning;
        }

        // Title text
        > span {
            flex: 1;
            font-size: 13px;
            font-weight: $es-font-weight-semibold;
            color: $es-slate-600;
        }
    }

    // Toggle chevron icon
    .tips-toggle {
        font-size: $es-font-size-xs;
        color: $es-slate-400;
        transition: transform 0.2s;
    }

    // Expanded state
    .target-tips-box.expanded {
        .tips-toggle {
            transform: rotate(180deg);
        }

        .tips-content {
            display: block;
        }
    }

    // Tips content (hidden by default)
    .tips-content {
        display: none;
        padding: 0 $es-spacing-lg $es-spacing-lg;
    }

    // Tips grid layout
    .tips-grid {
        display: grid;
        gap: $es-spacing-md;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    // Individual tip item
    .tip-item {
        display: flex;
        gap: $es-spacing-md;
        padding: $es-spacing-md;
        background: $es-white;
        border-radius: $es-radius-md;
        border: 1px solid $es-border-color;
    }

    // Tip icon
    .tip-icon {
        flex-shrink: 0;
        width: 2rem;
        height: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background: $es-primary-light;
        border-radius: $es-radius-md;
        color: $es-primary;
        font-size: $es-font-size-sm;
    }

    // Tip text content
    .tip-text {
        flex: 1;
        min-width: 0;

        strong {
            display: block;
            font-size: $es-font-size-xs;
            font-weight: $es-font-weight-semibold;
            color: $es-slate-700;
            margin-bottom: 0.25rem;
        }

        p {
            font-size: 11px;
            color: $es-text-muted;
            line-height: 1.625;
            margin: 0;
        }
    }

    // Tips footer
    .tips-footer {
        margin-top: $es-spacing-md;
        padding: 0.625rem $es-spacing-md;
        background: $es-white;
        border-radius: $es-radius-md;
        border: 1px dashed $es-gray-300;
        font-size: 11px;
        color: $es-text-muted;
        line-height: 1.625;

        i {
            color: $es-primary;
            margin-right: 0.25rem;
        }
    }
}
