/* Add your CSS styles here. The original file linked to a 'style.css' but its content was not provided. */
/* Example placeholder styles: */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f7f6;
    color: #333;
}

.input-section, .output-history-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

h1, h2, h3 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 20px;
}

.form-columns {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.column-1, .column-2, .column-3 {
    flex: 1;
    min-width: 300px;
}

.form-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #fdfdfd;
}

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

input[type="text"],
input[type="number"],
textarea,
select {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: background-color 0.2s ease;
}

button i {
    margin-right: 5px;
}

button:hover {
    opacity: 0.9;
}

button:active {
    transform: translateY(1px);
}

button:not([style*="background-color"]) { /* Default button color */
    background-color: #007bff;
    color: white;
}

button[style*="background-color: #6c757d;"] {
    background-color: #6c757d;
    color: white;
}

button[style*="background-color: #dc3545;"] {
    background-color: #dc3545;
    color: white;
}

.event-input-group {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
}

.remove-event-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2em;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.remove-event-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Struk Output Styles - Elegant Version */
.struk-output {
    border: 1px solid #ddd;
    padding: 0; 
    min-height: 300px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
}

.struk-header {
    background-color: #2c3e50; 
    color: white;
    text-align: center;
    padding: 25px 20px; 
    margin-bottom: 0;
    border-bottom: none; 
}

.struk-header h3 {
    color: white; 
    margin: 0 0 10px 0; 
    font-size: 2.2em; 
    font-weight: 700;
}

.struk-header p {
    margin: 2px 0;
    font-size: 0.85em; 
    color: #b0c7e0; 
}

.struk-content-body-elegant {
    padding: 30px; 
    color: #333;
}

.struk-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px; 
    font-size: 1.1em;
}

.struk-info-item {
    flex: 1;
}

.struk-info-item p {
    margin: 0;
}

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

.struk-section-elegant {
    margin-bottom: 30px; 
}

.struk-section-elegant h4 {
    color: #0056b3;
    font-size: 1.3em;
    margin-bottom: 15px; 
    border-bottom: 2px solid #eee; 
    padding-bottom: 5px;
}

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

.struk-table-elegant th, .struk-table-elegant td {
    border: 1px solid #e0e0e0; 
    padding: 10px 12px;
    text-align: left;
}

.struk-table-elegant th {
    background-color: #f8f8f8; 
    font-weight: 600;
    color: #555;
}

.struk-table-elegant tbody tr:nth-child(even) {
    background-color: #fcfcfc; 
}

.struk-table-elegant .text-right {
    text-align: right;
}

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

.struk-summary-table-elegant td {
    padding: 8px 0;
    border-bottom: 1px dashed #eee; 
}

.struk-summary-table-elegant td:first-child {
    font-weight: 500;
}

.struk-summary-table-elegant .text-right {
    text-align: right;
}

.keterangan-minor {
    font-size: 0.8em;
    color: #888;
    display: block; 
}

.total-row-elegant td {
    font-weight: bold;
    font-size: 1.3em; 
    color: #000; /* Changed from #28a745 (green) to #000 (black) */
    border-top: 2px solid #ddd; 
    padding-top: 15px;
    margin-top: 10px;
}

.struk-signature-elegant {
    display: flex;
    justify-content: space-between;
    margin-top: 50px; 
    padding-top: 20px;
    border-top: 1px solid #eee; 
}

.signature-column-elegant {
    flex: 1;
    line-height: 1.6;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    min-height: 100px; 
}

.signature-column-elegant p {
    margin: 0;
}

.signature-column-elegant.signature-left {
    text-align: left; 
    padding-right: 20px; 
}

.signature-column-elegant.signature-right {
    text-align: right; 
    padding-left: 20px; 
}

.signature-name {
    font-weight: 600;
}

.small-text-elegant {
    font-size: 0.8em;
    color: #777;
    align-self: flex-end; 
}


/* History Section Styles - unchanged */
.history-section {
    margin-top: 30px;
}

.history-section h2 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

#historyTableContainer {
    overflow-x: auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#historyTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#historyTable th, #historyTable td {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

#historyTable th {
    background-color: #007bff;
    color: white;
    font-weight: 600;
}

#historyTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#historyTable tr:hover {
    background-color: #f1f1f1;
}

.action-buttons button {
    margin-right: 5px;
    padding: 6px 12px;
    font-size: 0.9em;
}

@media (max-width: 992px) {
    .form-columns {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .input-section, .output-history-section {
        padding: 20px;
    }

    button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .struk-info-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .struk-info-item.text-right {
        text-align: left;
        margin-top: 10px;
    }
    .struk-signature-elegant {
        flex-direction: column;
        align-items: center;
    }
    .signature-column-elegant {
        text-align: center; 
        padding: 0; 
        margin-bottom: 20px;
    }
    .signature-column-elegant.signature-left,
    .signature-column-elegant.signature-right {
        text-align: center; 
    }
    .small-text-elegant {
        align-self: center; 
    }
}

/* Print Media Styles */
@media print {
    body {
        margin: 0;
        padding: 0;
        background-color: #fff !important; 
        -webkit-print-color-adjust: exact !important; 
        print-color-adjust: exact !important; 
    }

    body * {
        visibility: hidden; 
    }

    .struk-output, .struk-output * {
        visibility: visible !important; 
        color: #000 !important; 
    }

    .struk-output {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%; 
        box-shadow: none !important; 
        border: none !important; 
        padding: 0 !important; 
    }

    .struk-content-body-elegant {
        padding: 20px !important; 
    }

    .struk-header {
        background-color: #2c3e50 !important; 
        color: white !important; 
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .struk-header h3,
    .struk-header p {
        color: white !important; 
    }
    
    .struk-table-elegant {
        border-collapse: collapse !important; 
        border: none !important; 
    }

    .struk-table-elegant th, 
    .struk-table-elegant td {
        border: 1px solid #000 !important; 
        background-color: #fff !important; 
        color: #000 !important; 
    }

    .struk-table-elegant th {
        background-color: #f2f2f2 !important; 
        color: #000 !important;
    }

    .struk-table-elegant tbody tr:nth-child(even) {
        background-color: #f9f9f9 !important; 
    }

    .struk-summary-table-elegant td {
        border-bottom: 1px dashed #888 !important; 
        color: #000 !important; 
    }
    .struk-summary-table-elegant td:first-child {
        font-weight: 500 !important; 
    }


    .total-row-elegant td {
        color: #000 !important; /* Changed from #28a745 (green) to #000 (black) */
        border-top: 2px solid #000 !important; 
    }
    .total-row-elegant td:first-child {
        font-weight: bold !important; 
    }

    .struk-info-row p,
    .struk-section-elegant h4,
    .struk-signature-elegant p {
        color: #000 !important; 
    }

    .keterangan-minor {
        color: #666 !important; 
    }
    .small-text-elegant {
        color: #777 !important; 
    }


    /* Hide input forms and history sections */
    .input-section, 
    .history-section,
    button { 
        display: none !important;
    }
}