/* Reenite POS Frontend Styles */

.reenite-pos {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    background: #f9fafb;
}

.pos-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.pos-header h2 {
    margin: 0 0 5px;
    font-size: 28px;
}

.pos-date {
    opacity: 0.9;
    font-size: 14px;
}

.pos-container {
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 20px;
    min-height: 600px;
}

/* Products Section */
.pos-products {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-section {
    margin-bottom: 20px;
}

.pos-search {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.pos-search:focus {
    outline: none;
    border-color: #667eea;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding-right: 10px;
}

.product-grid::-webkit-scrollbar {
    width: 8px;
}

.product-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.product-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.product-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.product-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.15);
}

.product-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #9ca3af;
}

.product-info h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    margin: 5px 0;
}

.product-stock {
    font-size: 12px;
    color: #6b7280;
    margin: 5px 0 0;
}

/* Cart & Calculator Section */
.pos-cart-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pos-cart {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.pos-cart h3 {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    max-height: 300px;
    margin-bottom: 20px;
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.empty-cart .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.item-info h4 {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 600;
}

.item-price {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn,
.remove-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #f3f4f6;
}

.remove-btn {
    color: #dc2626;
    border-color: #fecaca;
}

.remove-btn:hover {
    background: #fee2e2;
}

.item-qty {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

.item-total {
    grid-column: 2;
    text-align: right;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.cart-summary {
    border-top: 2px solid #e5e7eb;
    padding-top: 15px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.total-row {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.cart-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Calculator */
.pos-calculator {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pos-calculator h3 {
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: 600;
}

.calculator {
    background: #f9fafb;
    border-radius: 10px;
    padding: 15px;
}

.calc-display {
    width: 100%;
    padding: 15px;
    font-size: 28px;
    text-align: right;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 15px;
    background: white;
    font-weight: 600;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-btn {
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.calc-btn:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.calc-btn:active {
    transform: translateY(0);
}

.calc-operator {
    background: #667eea;
    color: white;
}

.calc-operator:hover {
    background: #5568d3;
}

.calc-equals {
    background: #10b981;
    color: white;
}

.calc-equals:hover {
    background: #059669;
}

.calc-clear {
    background: #ef4444;
    color: white;
}

.calc-clear:hover {
    background: #dc2626;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Modal */
.reenite-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
}

.modal-content.modal-large {
    max-width: 900px;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 22px;
}

.close-modal {
    font-size: 32px;
    cursor: pointer;
    color: white;
    line-height: 1;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f9fafb;
    border-radius: 0 0 16px 16px;
}

/* Checkout */
.checkout-section {
    margin-bottom: 30px;
}

.checkout-section h3 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.payment-option {
    cursor: pointer;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-card {
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    text-align: center;
    transition: all 0.2s;
}

.payment-card .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
}

.payment-option input[type="radio"]:checked + .payment-card {
    border-color: #667eea;
    background: #f0f3ff;
}

.checkout-summary {
    background: #f9fafb;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.checkout-summary h3 {
    margin: 0 0 15px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.checkout-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #d1d5db;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-amount {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}

/* Success Modal */
.success-icon {
    width: 80px;
    height: 80px;
    background: #d1fae5;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #059669;
}

.text-center {
    text-align: center;
}

/* Loading & Empty States */
.loading-message,
.no-products {
    text-align: center;
    padding: 40px;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 1200px) {
    .pos-container {
        grid-template-columns: 1fr;
    }
    
    .pos-cart-section {
        flex-direction: row;
    }
    
    .pos-cart,
    .pos-calculator {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .pos-cart-section {
        flex-direction: column;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
}
