/* ============================================================================
   RECIPE BUILDER RESPONSIVE STYLES
   All media queries for responsive layout adjustments.
   
   Load order: This should be loaded LAST among recipe-builder CSS files.
   Dependencies: All other recipe-builder CSS files
   ============================================================================ */

/* ----------------------------------------------------------------------------
   TABLET (max-width: 1024px)
   ---------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .rb-fullscreen-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }
    
    .rb-message {
        max-width: 90%;
    }
    
    .rb-focus-chip-name {
        max-width: 120px;
    }
    
    .rb-conversation {
        max-height: 300px;
    }
}

/* ----------------------------------------------------------------------------
   MOBILE (max-width: 768px)
   ---------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .rb-fullscreen-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-height: auto;
    }
    
    .rb-conversation-panel,
    .rb-effects-panel {
        min-height: 300px;
    }
    
    .rb-message {
        max-width: 95%;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .rb-conversation {
        max-height: 250px;
        padding: 0.75rem;
    }
    
    .rb-focus-zone {
        padding: 0.5rem;
    }
    
    .rb-focus-chip {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .rb-focus-chip-name {
        max-width: 100px;
    }
    
    .rb-ai-content-condensed {
        flex-direction: column;
    }
    
    .rb-ai-input-small {
        width: 100%;
    }
    
    .rb-conversation-header,
    .rb-effects-header {
        padding: 0.5rem 0.75rem;
    }
    
    .rb-panel-title {
        font-size: 0.8rem;
    }
    
    .rb-history-condensed {
        padding: 0.5rem;
    }
    
    .rb-focus-zone-header {
        flex-wrap: wrap;
    }
    
    .rb-focus-zone-hint {
        width: 100%;
        margin-left: 0;
        margin-top: 0.25rem;
    }
    
    /* Diff styles for mobile */
    .rb-diff-line--removed,
    .rb-diff-line--added,
    .rb-diff-line--unchanged {
        font-size: 0.75rem;
        padding: 0.125rem 0.375rem;
    }
    
    .rb-effect-change-card {
        padding: 0.5rem;
    }
    
    .rb-effect-change-card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .rb-effect-change-card-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .rb-diff-stats {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* ----------------------------------------------------------------------------
   VERY SMALL SCREENS (max-width: 480px)
   ---------------------------------------------------------------------------- */

@media (max-width: 480px) {
    .rb-conversation {
        max-height: 200px;
    }
    
    .rb-message {
        max-width: 100%;
    }
    
    .rb-focus-chip-name {
        max-width: 80px;
    }
    
    .rb-typing-indicator {
        padding: 0.5rem 0.75rem;
    }
    
    /* Diff styles for very small screens */
    .rb-diff-line--removed,
    .rb-diff-line--added,
    .rb-diff-line--unchanged {
        font-size: 0.7rem;
        padding: 0.125rem 0.25rem;
        border-left-width: 2px;
    }
    
    .rb-effect-change-card-title {
        font-size: 0.8rem;
    }
    
    .rb-change-badge {
        font-size: 0.6rem;
        padding: 0.0625rem 0.25rem;
    }

    .rb-diff-collapsed-marker {
        min-height: 44px;
    }
}

/* ----------------------------------------------------------------------------
   REDUCED MOTION
   ---------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .rb-diff-expandable,
    .rb-effect-change-card,
    .rb-diff-collapsed-marker {
        transition: none;
    }
}
