/* Vertex Quick Order Pad Scoped Styling */

.qop-container {
    --vt-primary: #10b981; /* Emerald Green */
    --vt-primary-dark: #059669;
    --vt-primary-light: #ecfdf5;
    --vt-dark: #1f2937; /* Slate Gray */
    --vt-dark-light: #4b5563;
    --vt-light: #f9fafb;
    --vt-border: #e5e7eb;
    
    --color-success: #10b981;
    --color-success-bg: #d1fae5;
    --color-success-text: #065f46;
    --color-danger: #ef4444;
    --color-danger-bg: #fee2e2;
    --color-danger-text: #991b1b;
    
    --vt-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --vt-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --vt-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    width: 100%;
    margin: 1.5rem auto;
    padding: 1.5rem;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--vt-border);
    box-shadow: var(--vt-shadow-lg);
}

.qop-container h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--vt-dark);
    margin-top: 0;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

/* File Upload Widget */
.qop-file-upload {
    margin-bottom: 1.5rem;
}

.qop-upload-wrap {
    border: 2px dashed var(--vt-primary);
    border-radius: 10px;
    background: var(--vt-primary-light);
    position: relative;
    transition: var(--vt-transition);
    cursor: pointer;
}

.qop-upload-wrap:hover,
.qop-upload-wrap.qop-dropping {
    background-color: #d1fae5;
    border-color: var(--vt-primary-dark);
}

.qop-file-input {
    position: absolute;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    outline: none;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.qop-drag-text {
    text-align: center;
    padding: 2.5rem 1rem;
}

.qop-drag-text h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--vt-primary-dark);
}

.qop-drag-text p {
    margin: 0.5rem 0 0 0;
    font-size: 0.85rem;
    color: var(--vt-dark-light);
}

/* Uploaded File Details */
.qop-file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--vt-light);
    border: 1px solid var(--vt-border);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    box-shadow: var(--vt-shadow);
}

.qop-file-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qop-file-icon {
    font-size: 1.5rem;
}

.qop-file-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--vt-dark);
}

.qop-remove-btn {
    background: none !important;
    border: 1px solid var(--vt-border) !important;
    color: var(--color-danger) !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 6px !important;
    transition: var(--vt-transition) !important;
}

.qop-remove-btn:hover {
    background-color: var(--color-danger-bg) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
}

/* Loading Spinner */
.qop-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 0.75rem;
    border: 1px solid var(--vt-border);
    border-radius: 10px;
    background: var(--vt-light);
    margin-bottom: 1.5rem;
}

.qop-spinner {
    border: 3px solid rgba(16, 185, 129, 0.1);
    border-left-color: var(--vt-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    animation: qop-spin 0.8s linear infinite;
}

.qop-spinner-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--vt-primary-dark);
}

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

/* Modern Scoped Responsive Table */
.qop-container .custom-table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--vt-border);
    box-shadow: var(--vt-shadow);
    margin-bottom: 1.5rem;
    background: #ffffff;
}

.qop-container table.vt-custom-table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    font-size: 0.875rem;
}

.qop-container table.vt-custom-table thead th {
    background: var(--vt-light) !important;
    color: var(--vt-dark) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.725rem !important;
    letter-spacing: 0.05em !important;
    padding: 1rem 1.25rem !important;
    border-bottom: 2px solid var(--vt-border) !important;
    text-align: left;
}

.qop-container table.vt-custom-table tbody td {
    padding: 0.75rem 1.25rem !important;
    border-bottom: 1px solid var(--vt-border) !important;
    color: var(--vt-dark-light) !important;
    vertical-align: middle !important;
    background: #ffffff;
    transition: var(--vt-transition);
}

.qop-container table.vt-custom-table tbody tr:last-child td {
    border-bottom: none !important;
}

.qop-container table.vt-custom-table tbody tr:hover td {
    background: var(--vt-light) !important;
}

/* Table Inputs */
.qop-container .qop-input {
    width: 100%;
    border: 1px solid var(--vt-border) !important;
    border-radius: 6px !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.85rem !important;
    color: var(--vt-dark) !important;
    outline: none !important;
    transition: var(--vt-transition) !important;
    background: #ffffff !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02) !important;
    box-sizing: border-box !important;
}

.qop-container .qop-input:focus {
    border-color: var(--vt-primary) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15), inset 0 1px 2px rgba(0,0,0,0.02) !important;
}

.qop-container .qop-input.qty {
    max-width: 90px;
    text-align: center;
}

.qop-container .qop-input.description {
    background-color: #f3f4f6 !important;
    cursor: not-allowed;
    text-overflow: ellipsis;
}

/* Match States on Description Input */
.qop-container .qop-input.description.qop-matched {
    background-color: var(--color-success-bg) !important;
    color: var(--color-success-text) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    font-weight: 600;
}

.qop-container .qop-input.description.qop-unmatched {
    background-color: var(--color-danger-bg) !important;
    color: var(--color-danger-text) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    font-weight: 600;
}

/* Row Actions */
.qop-container .qop-delete-row {
    background: none !important;
    border: none !important;
    color: var(--vt-dark-light) !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: var(--vt-transition) !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.qop-container .qop-delete-row:hover {
    color: var(--color-danger) !important;
    background-color: var(--color-danger-bg) !important;
}

/* Control Buttons */
.qop-container .qop-table-controls {
    margin-top: 1rem;
    overflow: hidden;
}

.qop-container .qop-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff !important;
    color: var(--vt-dark-light) !important;
    border: 1px solid var(--vt-border) !important;
    border-radius: 6px !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: var(--vt-transition) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
}

.qop-container .qop-btn-secondary:hover {
    background: var(--vt-light) !important;
    color: var(--vt-dark) !important;
    border-color: var(--vt-dark-light) !important;
}

.qop-container .qop-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--vt-primary) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 0.5rem 1.25rem !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.15) !important;
    transition: var(--vt-transition) !important;
}

.qop-container .qop-btn-primary:hover {
    background: var(--vt-primary-dark) !important;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.25) !important;
    transform: translateY(-1px);
}

.qop-container .qop-btn-primary:active {
    transform: translateY(0);
}
