/* Additional responsive components for LA'REALEZA */

/* ==================== BADGES & STATUS ==================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    background: #6b7280;
    color: white;
}

.badge.status-pending {
    background: #f59e0b;
    color: white;
}

.badge.status-approved {
    background: #10b981;
    color: white;
}

.badge.status-rejected {
    background: #ef4444;
    color: white;
}

.badge.status-completed {
    background: #3b82f6;
    color: white;
}

.badge.pay-paid {
    background: #10b981;
    color: white;
}

.badge.pay-unpaid {
    background: #ef4444;
    color: white;
}

.badge.pay-pending {
    background: #f59e0b;
    color: white;
}

@media (max-width: 576px) {
    .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
}

/* ==================== MOBILE TABLE STYLES ==================== */
@media (max-width: 768px) {
    .mobile-table-item .mobile-table-row:last-child {
        border-top: 1px solid #e5e7eb;
        padding-top: 0.75rem;
        margin-top: 0.75rem;
    }
}

/* ==================== QUOTE SYSTEM RESPONSIVE ==================== */
.q-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #3a86ff;
    border-radius: 8px;
    background: #3a86ff;
    color: white;
    transition: all 0.3s ease;
    min-height: 44px;
}

.q-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    text-decoration: none;
    color: white;
}

.q-btn.outline {
    background: transparent;
    color: #3a86ff;
}

.q-btn.outline:hover {
    background: #3a86ff;
    color: white;
}

.q-btn.gradient {
    background: linear-gradient(135deg, #3a86ff 0%, #2563eb 100%);
    border: none;
}

@media (max-width: 768px) {
    .q-btn {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
        min-height: 44px;
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* ==================== NOTIFICATION STYLES ==================== */
.q-note {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.q-note i {
    margin-top: 2px;
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .q-note {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
}

/* ==================== SEARCH AND FILTER RESPONSIVE ==================== */
.search-bar,
.filter-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-bar input,
.filter-bar select {
    flex: 1;
    min-width: 200px;
}

@media (max-width: 768px) {
    .search-bar,
    .filter-bar {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-bar input,
    .filter-bar select {
        width: 100%;
        min-width: unset;
    }
}

/* ==================== PRODUCT CARD ENHANCEMENTS ==================== */
.product-card .product-actions {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
}

.product-card .product-actions .btn {
    flex: 1;
}

@media (max-width: 480px) {
    .product-card .product-actions {
        padding: 0.75rem;
        flex-direction: column;
    }
    
    .product-card .product-actions .btn {
        width: 100%;
    }
}

/* ==================== MOBILE TOUCH IMPROVEMENTS ==================== */
@media (max-width: 768px) {
    /* Increase touch targets */
    a, button, .btn, input, select, textarea {
        min-height: 44px;
    }
    
    /* Improve spacing for touch */
    .nav-link {
        padding: 0.75rem 1rem;
    }
    
    /* Better mobile forms */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
    }
    
    /* Mobile-friendly dropdowns */
    select.form-control {
        appearance: none;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 0.5rem center;
        background-repeat: no-repeat;
        background-size: 1.5em 1.5em;
        padding-right: 2.5rem;
    }
}

/* ==================== LOADING STATES ==================== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3a86ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== ACCESSIBILITY IMPROVEMENTS ==================== */
/* Focus states */
*:focus {
    outline: 2px solid #3a86ff;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn, .badge, .card {
        border: 2px solid;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== DARK MODE SUPPORT ==================== */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #60a5fa;
        --dark-color: #f9fafb;
        --light-color: #1f2937;
        --white: #111827;
        --light-gray: #374151;
    }
    
    body {
        background-color: #111827;
        color: #f9fafb;
    }
    
    .card {
        background: #1f2937;
        border-color: #374151;
    }
}