/**
 * Custom CSS overrides for OpenClaw Control UI
 * This file is loaded after main CSS to override specific styles
 */

/* Mobile chat input fix - full width and prevent zoom on tap */
@media (max-width: 640px) {
    .chat-compose {
        padding: 8px 4px 4px !important;
        width: 100% !important;
    }

    .chat-compose__row {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .chat-compose__field {
        width: 100% !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
        order: 1 !important;
    }

    .chat-compose__field textarea {
        width: 100% !important;
        min-width: 100% !important;
        font-size: 16px !important;
        padding: 8px 10px !important;
        min-height: 60px !important;
    }

    .chat-compose__actions {
        width: 100% !important;
        order: 2 !important;
        display: flex !important;
        justify-content: flex-end !important;
    }

    .chat-compose .chat-compose__actions .btn {
        width: 100% !important;
        min-height: 44px !important; /* iOS touch target size */
        padding: 10px 16px !important;
    }
}

/* Tablet fallback */
@media (min-width: 641px) and (max-width: 768px) {
    .chat-compose__field textarea {
        font-size: 16px !important;
    }

    .chat-compose__field {
        flex: 1 !important;
    }
}

/* Small phones touch targets */
@media (max-width: 480px) {
    /* Make buttons easier to tap */
    .btn {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    .btn--icon {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 12px !important;
    }

    /* Reduce padding for compact screens */
    .card {
        padding: 12px !important;
    }

    /* Chat messages padding */
    .chat-bubble {
        padding: 10px 12px !important;
    }

    /* Nav items tap targets */
    .nav-item {
        padding: 10px 12px !important;
        min-height: 44px !important;
    }

    .nav-collapse-toggle {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    /* Form inputs touch targets */
    .field input,
    .field textarea,
    .field select {
        padding: 10px 12px !important;
        min-height: 44px !important;
    }
}

/* Very small phones */
@media (max-width: 400px) {
    .card {
        padding: 10px !important;
    }

    .chat-bubble {
        padding: 8px 10px !important;
    }

    .btn {
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
}
