/* 
 * POS System Styles
 */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.form-row {
    display: flex;
    margin-bottom: 15px;
    gap: 15px;
}

.form-group {
    flex: 1;
    position: relative;
    margin-bottom: 20px;
}

.form-group > div {
    position: relative;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.items-table th {
    background-color: #f2f2f2;
    padding: 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.items-table td {
    padding: 6px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.items-table tr:last-child td {
    border-bottom: none;
}

.item-row input {
    padding: 6px;
    font-size: 14px;
}

.add-item {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-bottom: 15px;
}

.remove-item {
    color: #dc3545;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    display: flex;
    justify-content: center;
}

.dropdown {
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: none;
}

.dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
}

.dropdown-item:hover, .dropdown-item.dropdown-active {
    background-color: #f5f5f5;
}

#customer-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    background-color: white !important;
    border: 2px solid #aaa !important;
    border-radius: 0 0 4px 4px !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3) !important;
    z-index: 1000 !important;
    margin-top: 1px !important;
}

#customer-dropdown .dropdown-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

#customer-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

#customer-dropdown .dropdown-item:hover {
    background-color: #f0f0f0;
}

/* Add visibility helper for debugging */
.show-important {
    display: block !important;
    visibility: visible !important;
}

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.payment-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.payment-button:hover {
    border-color: #aaa;
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.payment-button.selected {
    border-color: #007bff;
    background-color: #e6f2ff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

.payment-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: #555;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-button.selected .payment-icon {
    color: #007bff;
}

.payment-name {
    font-size: 12px;
    text-align: center;
    color: #333;
}

.payment-button.selected .payment-name {
    font-weight: bold;
    color: #007bff;
}

.summary {
    margin-top: 25px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
}

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

.summary-row:last-child {
    margin-bottom: 0;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    font-weight: bold;
}

.submit-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
    width: 100%;
}

.submit-btn:hover {
    background-color: #0069d9;
}

/* Debug Panel Styling */
#debug-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    max-height: 500px;
    overflow-y: auto;
    display: none;
}

.debug-section {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: white;
}

.debug-section h5 {
    margin-top: 0;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    color: #007bff;
}

.debug-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.debug-table th, .debug-table td {
    border: 1px solid #ddd;
    padding: 5px 8px;
    text-align: left;
}

.debug-table th {
    background-color: #f2f2f2;
}

#debug-log-entries {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
    background-color: #f5f5f5;
    padding: 8px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.log-entry {
    margin-bottom: 5px;
    padding: 3px 0;
    border-bottom: 1px dashed #ddd;
}

.debug-log {
    margin: 5px 0;
    padding: 8px;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-all;
    color: #333;
    display: none; /* Hidden by default */
}

.alert-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 20px 40px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    display: none;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    min-width: 300px;
    max-width: 80%;
}

.alert-message.alert-error {
    background-color: #dc3545;
    color: white;
}

.alert-message.alert-success {
    background-color: #28a745;
    color: white;
}

/* Transaction Complete Styling */
.transaction-complete {
    text-align: center;
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.success-icon {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 20px;
}

.success-message {
    font-size: 18px;
    color: #495057;
    margin-bottom: 30px;
}

.transaction-details {
    margin: 30px 0;
    text-align: left;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #495057;
}

.detail-value {
    color: #212529;
}

.actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border: 2px solid #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: 2px solid #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

#transaction-debug {
    margin-top: 30px;
    text-align: left;
}

#transaction-debug pre {
    background-color: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
    font-size: 12px;
    line-height: 1.5;
}
