/* Payment Modal Component Styles */

/* Search Container Premium */
.search-container-premium {
    margin-top: 20px;
}

.search-input-group-ultra {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.search-input-group-ultra:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.search-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 10px;
    color: #4f46e5;
    font-size: 1.1rem;
}

.search-input-large {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
    background: transparent;
}

.search-input-large::placeholder {
    color: #94a3b8;
}

.search-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
}

.search-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.4);
}

.search-action-btn:active {
    transform: translateY(0);
}

/* Search Results */
.search-results-floating-panel {
    display: none;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-top: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8fafc;
}

.result-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.result-details {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: #64748b;
}

.result-balance {
    font-weight: 800;
    font-size: 1.1rem;
}

.result-balance.debt {
    color: #ef4444;
}

.result-balance.paid {
    color: #10b981;
}

/* Payment Modal Card */
.payment-modal-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.client-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.client-card-avatar {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.client-card-info {
    flex: 1;
}

.client-card-name {
    display: block;
    font-weight: 800;
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 6px;
}

.client-card-badges {
    display: flex;
    gap: 10px;
    align-items: center;
}

.client-code-pill {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* Actions Section */
.actions-section {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.action-btn-glass {
    width: 40px;
    height: 40px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

.action-btn-glass:hover {
    background: #f8fafc;
    color: #4f46e5;
    border-color: #4f46e5;
}

.action-btn-glass.danger:hover {
    color: #ef4444;
    border-color: #ef4444;
}

/* Form Labels Premium */
.input-label-premium {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}

/* Input Group Premium */
.input-group-premium {
    position: relative;
}

/* Modal Loading State */
.modal.loading {
    pointer-events: none;
}

.modal.loading .modal-content {
    opacity: 0.6;
}

.modal.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid #f1f5f9;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Button Premium */
.btn-premium {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 28px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
}

.btn-premium:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .search-action-btn span {
        display: none;
    }

    .client-section {
        flex-wrap: wrap;
    }

    .payment-modal-card {
        padding: 15px;
    }

    /* Fix hardcoded inline grids for mobile */
    .form-grid[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .form-group.span-2[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .form-group.span-full[style*="grid-template-columns: 1fr 1fr 1fr 1fr"] {
        grid-template-columns: 1fr 1fr !important;
    }

    #payment-client-search-step {
        padding: 20px 10px !important;
    }

    .search-input-group-ultra {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .search-action-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0 !important;
    }

    #fiscal-summary-container>div {
        flex-direction: column;
        gap: 12px !important;
    }
}