/* ============================================================================
   RECIPE BUILDER FOCUS STYLES
   Focus zones, drag-and-drop states, focus chips/tags, and effect card states.
   
   Dependencies: variables.css (for animations and CSS custom properties)
   ============================================================================ */

/* ----------------------------------------------------------------------------
   FOCUS ZONE CONTAINER
   ---------------------------------------------------------------------------- */

.rb-focus-zone {
    padding: 0.75rem;
    background: var(--rb-bg-surface);
    border: 2px dashed var(--rb-border-default);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: border-color var(--rb-transition-fast), background var(--rb-transition-fast);
}

.rb-focus-zone.active {
    border-color: var(--rb-color-purple);
    background: rgba(124, 58, 237, 0.05);
}

.rb-focus-zone.drag-over {
    border-color: var(--rb-color-info);
    background: rgba(59, 130, 246, 0.1);
    border-style: solid;
}

/* Focus Zone Header */
.rb-focus-zone-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.rb-focus-zone-icon {
    font-size: 1rem;
    color: var(--rb-color-purple);
}

.rb-focus-zone-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--rb-text-secondary);
}

.rb-focus-zone-hint {
    font-size: 0.7rem;
    color: var(--rb-text-muted);
    margin-left: auto;
}

/* Focus Zone Empty State */
.rb-focus-zone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--rb-text-muted);
    font-size: 0.8rem;
    text-align: center;
}

.rb-focus-zone-empty-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Focus Zone Items */
.rb-focus-zone-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ----------------------------------------------------------------------------
   FOCUS CHIPS
   ---------------------------------------------------------------------------- */

.rb-focus-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.4rem;
    background: linear-gradient(135deg, var(--rb-color-purple-dark) 0%, #312e81 100%);
    border: 1px solid var(--rb-border-purple);
    border-radius: 10px;
    font-size: 0.65rem;
    color: var(--rb-text-primary);
    animation: rb-message-appear var(--rb-transition-fast) ease-out;
}

.rb-focus-chip-icon {
    font-size: 0.65rem;
}

.rb-focus-chip-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rb-focus-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--rb-text-secondary);
    cursor: pointer;
    font-size: 0.55rem;
    line-height: 1;
    transition: background var(--rb-transition-fast), color var(--rb-transition-fast);
}

.rb-focus-chip-remove:hover {
    background: var(--rb-color-error);
    color: white;
}

/* Focus Chips Container */
.rb-focus-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* ----------------------------------------------------------------------------
   INLINE FOCUS DISPLAY
   ---------------------------------------------------------------------------- */

.rb-focus-inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0.5rem;
    background: var(--rb-bg-base);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.rb-focus-inline-label {
    font-size: 0.7rem;
    color: var(--rb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.rb-focus-inline-hint {
    font-size: 0.75rem;
    color: var(--rb-text-dimmed);
    font-style: italic;
}

/* ----------------------------------------------------------------------------
   FOCUS TAGS (Smaller Variant)
   ---------------------------------------------------------------------------- */

.rb-focus-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: var(--rb-color-purple);
    border-radius: 12px;
    font-size: 0.7rem;
    color: white;
}

.rb-focus-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 0.65rem;
    line-height: 1;
    transition: color var(--rb-transition-fast), background var(--rb-transition-fast);
}

.rb-focus-tag-remove:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ----------------------------------------------------------------------------
   FOCUS BUTTON (Toggle on Effect Cards)
   ---------------------------------------------------------------------------- */

.rb-btn-focus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--rb-bg-elevated);
    border: 1px solid var(--rb-border-default);
    border-radius: 4px;
    color: var(--rb-text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all var(--rb-transition-fast);
}

.rb-btn-focus:hover {
    border-color: var(--rb-color-purple);
    color: var(--rb-color-purple);
}

.rb-btn-focus.active {
    background: var(--rb-color-purple);
    border-color: var(--rb-color-purple);
    color: white;
}

.rb-btn-focus:focus-visible {
    outline: 2px solid var(--rb-color-purple);
    outline-offset: 2px;
}

/* Focus Toggle Button (Alternative) */
.rb-focus-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: 1px solid var(--rb-border-medium);
    border-radius: 4px;
    color: var(--rb-text-secondary);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all var(--rb-transition-fast);
}

.rb-focus-toggle:hover {
    background: var(--rb-bg-hover);
    border-color: var(--rb-primary);
}

.rb-focus-toggle.is-focused {
    background: var(--rb-primary);
    border-color: var(--rb-primary);
    color: white;
}

/* Focus Badge (Indicator on Effect Cards) */
.rb-focus-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 0.25rem;
    background: var(--rb-color-purple);
    border-radius: 9px;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
}

/* ----------------------------------------------------------------------------
   FOCUS HEADER & ADDITIONAL CLASSES
   ---------------------------------------------------------------------------- */

.rb-focus-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--rb-border-dark);
}

.rb-focus-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--rb-text-secondary);
}

.rb-focus-count {
    font-size: 0.75rem;
    color: var(--rb-text-muted);
    background: var(--rb-bg-hover);
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
}

.rb-focus-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    text-align: center;
    color: var(--rb-text-muted);
}

.rb-focus-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.rb-focus-hint {
    font-size: 0.8rem;
    color: var(--rb-text-muted);
}

/* ----------------------------------------------------------------------------
   DRAG HANDLE
   ---------------------------------------------------------------------------- */

.rb-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--rb-text-dimmed);
    cursor: grab;
    font-size: 0.875rem;
    opacity: 0.5;
    transition: opacity var(--rb-transition-fast), color var(--rb-transition-fast);
}

.rb-drag-handle:hover {
    opacity: 1;
    color: var(--rb-text-muted);
}

.rb-effect-card:active .rb-drag-handle {
    cursor: grabbing;
}

/* ----------------------------------------------------------------------------
   EFFECT CARD DRAGGABLE STATES
   Note: Base .rb-effect-card styles including transitions are in base.css
   ---------------------------------------------------------------------------- */

.rb-effect-card[draggable="true"] {
    cursor: grab;
}

.rb-effect-card[draggable="true"]:active {
    cursor: grabbing;
}

.rb-effect-card.is-dragging {
    opacity: 0.5;
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.rb-effect-card.is-focused {
    border-color: var(--rb-color-purple);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

/* Touch Drag State */
.rb-touch-dragging {
    opacity: 0.7;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ----------------------------------------------------------------------------
   INLINE TAGS
   ---------------------------------------------------------------------------- */

.rb-inline-tags {
    display: inline-flex;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.rb-inline-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.375rem;
    background: var(--rb-bg-hover);
    border-radius: 3px;
    font-size: 0.7rem;
    color: var(--rb-text-muted);
}