/* Este archivo se mantiene vacío para evitar conflictos con estilos existentes *//* Mobile Orders Production Styles */

/* Base styles for orders module */
.ordenes-container {
    padding: 8px !important; /* Reduce padding to match universal spacing */
    padding-bottom: 80px; /* Space for bottom navigation */
}

/* Reduce spacing for orders view specifically */
#orders .card, #orders .mobile-card, #orders .orden-card {
    margin-bottom: 8px !important;
    margin-top: 0 !important;
}

#orders .card-body {
    padding: 12px !important;
}

/* Orders List Styles */
.ordenes-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 1rem;
    /* Negative margin to compensate for padding and maintain full width scroll */
    margin-left: -1rem;
    margin-right: -1rem;
    /* Ensure scrollbar is visible on iOS */
    -webkit-overflow-scrolling: touch;
    /* Add visual indication of scrollability */
    scroll-behavior: smooth;
    /* Prevent content from being cut off */
    min-height: 48px;
}

/* Hide scrollbar but keep functionality */
.ordenes-filters::-webkit-scrollbar {
    height: 4px;
}

.ordenes-filters::-webkit-scrollbar-track {
    background: transparent;
}

.ordenes-filters::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.875rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    /* Ensure minimum width for readability */
    min-width: fit-content;
    /* Prevent shrinking */
    flex-shrink: 0;
}

.filter-chip.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-chip i {
    margin-right: 0.5rem;
}

/* Order Cards */
.orden-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.orden-card:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.orden-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.orden-numero {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

.orden-estado {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

/* Estado badges */
.estado-pendiente {
    background-color: #FEF3C7;
    color: #92400E;
}

.estado-en-proceso {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.estado-completada {
    background-color: #D1FAE5;
    color: #065F46;
}

.estado-cancelada {
    background-color: #FEE2E2;
    color: #991B1B;
}

/* Order body */
.orden-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.orden-info-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.orden-info-item i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.orden-tipo {
    font-weight: 500;
    color: var(--text-color);
}

/* Order actions */
.orden-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-orden-action {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-orden-action:active {
    background-color: var(--primary-dark);
}

.btn-orden-action.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}


/* Order Form Styles */
.orden-form-container {
    padding: 1rem;
}

.form-section {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.form-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-color);
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Selection buttons */
.selection-button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.75rem;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.selection-button:active {
    background-color: var(--surface-color);
}

.selection-button.has-value {
    border-color: var(--primary-color);
}

.selection-button-text {
    flex: 1;
    text-align: left;
}

.selection-button-icon {
    color: var(--text-secondary);
}

/* File upload */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background-color: var(--surface-color);
}

.file-upload-icon {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.file-upload-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Action buttons */
.form-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--background-color);
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
}

.btn-form-action {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-form-action.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-form-action.secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-form-action:active {
    transform: translateY(1px);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Loading states */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* CSS Variables */
:root {
    --surface-color: #ffffff;
    --background-color: #f8fafc;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
}



/* Quick Actions for Swipe */
.orden-card {
    position: relative;
    overflow: hidden;
}

.quick-actions {
    position: absolute;
    top: 0;
    right: -150px;
    bottom: 0;
    width: 150px;
    display: flex;
    transition: right 0.3s ease;
}

.orden-card.show-actions .quick-actions {
    right: 0;
}

.quick-action {
    flex: 1;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.quick-action i {
    font-size: 20px;
    color: white;
}

.quick-action.edit {
    background-color: #3B82F6;
}

.quick-action.share {
    background-color: #10B981;
}

.quick-action.delete {
    background-color: #EF4444;
}

.quick-action:active {
    opacity: 0.8;
}

/* Option buttons in modal */
.option-button {
    width: 100%;
    padding: 16px;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 16px;
    color: var(--mobile-text-primary);
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--mobile-border);
}

.option-button:last-child {
    border-bottom: none;
}

.option-button:hover {
    background-color: var(--mobile-hover);
}

.option-button i {
    font-size: 20px;
    color: var(--mobile-text-secondary);
}

.option-button.danger {
    color: #EF4444;
}

.option-button.danger i {
    color: #EF4444;
}

/* Order Type Buttons */
.order-type-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.order-type-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.order-type-btn i {
    font-size: 1.5rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.order-type-btn:hover {
    background: var(--surface-color);
    border-color: var(--primary-color);
}

.order-type-btn:hover i {
    color: var(--primary-color);
}

.order-type-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.order-type-btn.active i {
    color: white;
}

.order-type-btn:active {
    transform: scale(0.98);
}

/* Projects Summary Styles */
.projects-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.project-summary-item i {
    color: var(--primary-color);
    font-size: 1rem;
}

.project-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-color);
}

.project-part-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--surface-color);
    padding: 4px 8px;
    border-radius: 12px;
}

/* Form Toggle Option Styles for Multi-Project Mode */
.form-toggle-option {
    margin-top: 16px;
    padding: 12px;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.toggle-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-checkbox input[type="checkbox"] {
    position: relative;
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    opacity: 0;
}

.checkmark {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-checkbox input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.toggle-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.toggle-label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.toggle-description {
    margin: 8px 0 0 32px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 375px) {
    .ordenes-filters {
        gap: 0.25rem;
        /* Add fade effect on edges to indicate scrollability */
        position: relative;
    }
    
    .filter-chip {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
        /* Ensure text is never cut off on small screens */
        min-width: max-content;
    }
    
    .orden-body {
        grid-template-columns: 1fr;
    }
}

/* Add gradient fade indicators for scrollable content */
.ordenes-filters {
    position: relative;
}

.ordenes-filters::before,
.ordenes-filters::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 1;
}

.ordenes-filters::before {
    left: 0;
    background: linear-gradient(to right, var(--background-color), transparent);
}

.ordenes-filters::after {
    right: 0;
    background: linear-gradient(to left, var(--background-color), transparent);
}