/**
 * Receipt Sales 2 - Styles
 */

.receipt-sales2-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Header Section */
.receipt-header-section {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.csc-logo {
    width: 120px;
    height: auto;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 4px solid #1e3c72;
}

.csc-title {
    color: #c0392b;
    font-size: 32px;
    font-weight: 800;
    margin: 10px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.csc-address {
    color: #2c3e50;
    font-size: 16px;
    margin: 5px 0;
    font-weight: 600;
}

.csc-contact {
    color: #7f8c8d;
    font-size: 14px;
    margin: 5px 0;
}

/* Search Section */
.search-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.search-field {
    flex: 1;
    min-width: 200px;
}

.search-field label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 14px;
}

.search-field input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-field input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Customer Search Dropdown */
.customer-search-wrapper {
    position: relative;
}

.customer-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.customer-suggestions.active {
    display: block;
}

.customer-suggestions .suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.customer-suggestions .suggestion-item:last-child {
    border-bottom: none;
}

.customer-suggestions .suggestion-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.customer-suggestions .customer-details {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

.customer-suggestions .suggestion-item:hover .customer-details {
    color: rgba(255, 255, 255, 0.8);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
}

.btn-receipt {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 8px 20px;
    font-size: 14px;
}

.btn-receipt:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

/* Records Section */
.records-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.section-title {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Records Table */
.records-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.records-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.records-table th {
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.records-table tbody tr {
    border-bottom: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.records-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.records-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: scale(1.01);
}

.records-table td {
    padding: 15px 12px;
    color: #2c3e50;
    font-size: 14px;
}

.records-table .amount {
    font-weight: 700;
    color: #27ae60;
}

/* Receipt Modal */
.receipt-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.receipt-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.receipt-content {
    background: white;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

/* Receipt Header */
.receipt-header {
    text-align: center;
    border-bottom: 3px solid #1e3c72;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.receipt-logo {
    width: 100px;
    height: auto;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid #1e3c72;
}

.receipt-main-title {
    color: #c0392b;
    font-size: 28px;
    font-weight: 800;
    margin: 10px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.receipt-sub-title {
    color: #2c3e50;
    font-size: 14px;
    margin: 5px 0;
    font-weight: 600;
}

.receipt-contact {
    color: #7f8c8d;
    font-size: 12px;
    margin: 5px 0;
}

.receipt-title {
    color: #1e3c72;
    font-size: 36px;
    font-weight: 800;
    margin: 20px 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Receipt Info */
.receipt-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-left, .info-right {
    flex: 1;
}

.info-left {
    text-align: left;
}

.info-right {
    text-align: right;
}

.receipt-info p {
    margin: 0;
    color: #2c3e50;
    font-size: 16px;
}

.receipt-info strong {
    color: #1e3c72;
}

/* Customer Info Section */
.customer-info-section {
    border: 2px solid #1e3c72;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.05) 0%, rgba(102, 126, 234, 0.05) 100%);
}

.customer-info-section h3 {
    color: #1e3c72;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px dashed #667eea;
}

.customer-info-section p {
    color: #2c3e50;
    font-size: 14px;
    margin: 8px 0;
    padding-left: 15px;
    border-left: 3px solid #667eea;
}

/* Receipt Table */
.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.receipt-table thead {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.receipt-table th {
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #fff;
}

.receipt-table tbody tr {
    border: 1px solid #ddd;
    transition: all 0.2s ease;
}

.receipt-table tbody tr:nth-child(even) {
    background: #f0f4ff;
}

.receipt-table tbody tr:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.receipt-table td {
    padding: 10px 8px;
    text-align: center;
    color: #1e3c72;
    font-size: 12px;
    border: 1px solid #ddd;
}

.receipt-table tbody tr td:first-child {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
}

.receipt-table tfoot tr {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.receipt-table tfoot td {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    font-weight: 700;
    font-size: 14px;
    border: none;
}

/* Receipt Summary */
.receipt-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8eef5 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px solid #1e3c72;
}

.receipt-summary p {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.receipt-summary strong {
    color: #1e3c72;
}

.receipt-summary span {
    color: #27ae60;
    font-weight: 700;
    font-size: 16px;
}

/* Receipt Footer */
.receipt-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed #667eea;
}

.thank-you {
    color: #1e3c72;
    font-size: 18px;
    font-weight: 600;
    font-style: italic;
    margin-bottom: 10px;
}

.proprietor {
    color: #667eea;
    font-size: 16px;
    font-weight: 700;
}

/* Receipt Actions */
.receipt-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.receipt-actions .btn {
    min-width: 150px;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .receipt-sales2-container {
        padding: 10px;
    }
    
    .search-row {
        flex-direction: column;
    }
    
    .search-field {
        min-width: 100%;
    }
    
    .button-group {
        width: 100%;
        justify-content: center;
    }
    
    .receipt-content {
        padding: 20px;
    }
    
    .receipt-title {
        font-size: 28px;
    }
    
    .receipt-main-title {
        font-size: 22px;
    }
    
    .records-table {
        font-size: 12px;
    }
    
    .records-table th,
    .records-table td {
        padding: 10px 8px;
    }
    
    .receipt-actions {
        flex-direction: column;
    }
    
    .receipt-actions .btn {
        width: 100%;
    }
}

/* Empty State */
.no-records {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.no-records h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.no-records p {
    font-size: 16px;
}

/* Print Styles */
@media print {
    .receipt-sales2-container {
        background: white;
    }
    
    .search-section,
    .button-group,
    .receipt-actions {
        display: none;
    }
    
    .receipt-modal {
        display: block !important;
        position: static;
        background: white;
    }
    
    .receipt-content {
        box-shadow: none;
    }
}
