/**************************************************
 * MODERN RECEIPT MODULE - MINIMALIST STYLES
 * Matches quotation.css design with #2c3e50 primary
 **************************************************/

/* Base Receipt Container */
#receipt {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #2c3e50;
  
}

/* Module Controls */
#receipt .module-controls {
           flex: 1;
    /* padding: 8px 12px; */
    /* border: 1px solid #e1e8ed; */
    /* border-radius: 6px; */
    background-color: #f8f9fa;
    font-size: 14px;
    color: #2c3e50;

}

#receipt .module-controls select {
    /* flex: 1; */
    padding: 10px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    background-color: white;
    font-size: 12px !important;
    color: #2c3e50;
    height: 35px;
    font-size: 12px !important;
}

#receipt .module-controls button {
    padding: 8px 16px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#receipt .module-controls button:hover {
    background-color: #34495e;
}

/* Receipt Container */
#receipt .receipt-container {
    /* width: 1200px; */
    margin: 0 auto;
    padding: 15px;
    background-color: #f8f9fa;
}

#receipt .receipt-content {
    width: 100%;
}

/* Header Section */
#receipt .header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: row;
    padding-bottom: 0px !important;
}

#receipt .header-left {
    /* flex: 1; */
}

#receipt .title {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 15px 0;
    letter-spacing: -0.02em;
    width: 300px;
}

#receipt .header-right {
    width: 250px;
    padding-left: 65px;
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
}

/* Logo Container */
#receipt #receipt-logo-area {
    width: 200px !important;
    height: 100px !important;
    border: 2px dashed #e1e8ed;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    background-color: white;
    transition: border-color 0.2s ease;
}

#receipt #receipt-logo-area:hover {
    border-color: #2c3e50;
}

#receipt #receipt-no-logo-text {
    color: #7f8c8d;
    font-size: 12px;
    text-align: center;
    /* background: #f8f9fa; */
}

#receipt #receipt-logo-display {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#receipt .preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#receipt #receipt-logo-input {
    display: none;
}

/* Company Information */
#receipt #receipt-company-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 20px 0 0px 0 !important;
    /* min-height: 24px; */
    outline: none;
    text-transform: capitalize;
    /* padding-top: 17px; */
    border-radius: 4px;
    background: white;
    transition: background-color 0.2s ease;
}

#receipt #receipt-company-name:focus {
    background-color: rgba(255, 255, 255, 0.1);
}

#receipt #receipt-company-address {
    width: 100%;
    min-height: 60px;
    padding: 5px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    font-size: 11px !important;
    color: #2c3e50;
    background-color: white;
    resize: vertical;
    /* font-family: inherit; */
    box-sizing: border-box;
    background: white;
}

#receipt #receipt-company-address:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

/* Section Titles */
#receipt .section-title {
    color: #2c3e50;
    font-size: 16px !important;
    font-weight: 600;
    margin: 6px 0 5px 0;
    padding: 5px 5px;
    background-color: #f8f9fa;
    border-left: 4px solid #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-size: 14px;
}

/* Company Box */
#receipt .company-box {
    padding: 5px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    width: 100%;
}

#receipt .company-box strong {
    display: block;
    color: #2c3e50;
    font-size: 11px;
    font-weight: 600;
    text-transform: lowercase;
    letter-spacing: 0.02em;
}

/* Form Elements */
#receipt input[type="text"],
#receipt input[type="date"],
#receipt input[type="number"],
#receipt select {
    width: 100%;
    height: 30px;
    padding: 5px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    font-size: 12px !IMPORTANT;
    color: #2c3e50;
    background-color: white;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    /* margin: 5px; */
}

#receipt input:focus,
#receipt select:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

#receipt #receipt-customerName {
    font-weight: 600;
    text-transform: uppercase;
    width: 50%;
    font-size: 14px !important;
    font-weight: 600;
}

#receipt #receipt-customerAddress,
#receipt #paymentNotes {
    width: 50%;
    /* min-height: 66px; */
    padding: 5px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    font-size: 11px !important;
    color: #2c3e50;
    background-color: #fff;
    resize: vertical;
    /* font-family: inherit; */
}

#receipt .address-textarea {
    width: 100%;
    /* min-height: 60px; */
    padding: 10px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    font-size: 12px;
    color: #2c3e50;
    background-color: white;
    resize: vertical;
    /* font-family: inherit; */
    box-sizing: border-box;
    background: #f8f9fa;
}

#receipt .address-textarea:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

#receipt label {
    display: block;
    /* margin-bottom: 5px; */
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

/* Tables */
#receipt table {
    width: 100% !important;
    border-collapse: collapse;
    margin-bottom: 10px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.reference-box {
    display: flex;
    justify-content: flex-start;
    /* padding: 5px; */
    /* margin: 5px; */
    font-size: 11px !important;
    gap: 23px;
}

input#invoiceReference {
    width: 172px !important;
    /* font-size: 11px !important; */
}
#receipt .receipt-items-table {
    width: 75%;
}

#receipt th {
    background-color: var(--primary);
    color: #ffffff;
    padding: 10px 10px;
    text-align: center;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

#receipt td {
    /* padding: 3px; */
    border-bottom: 1px solid #e1e8ed;
    vertical-align: middle;
    text-align: center;
    font-size: 14px;
    /* min-width: 17px; */
}

#receipt tbody tr:last-child td {
    border-bottom: none;
}

#receipt tbody tr:hover {
    background-color: #f8f9fa;
}

#receipt tfoot tr {
    background-color: #2c3e50;
    color: white;
    font-weight: 600;
}

#receipt tfoot td {
    border-bottom: none;
    padding: 10px 10px;
    background: var(--primary);
    /* font-size: 12px; */
}

#receipt .text-right {
    text-align: right;
}

#receipt .text-left {
    text-align: left;
}

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

/* Table Inputs */
#receipt table input,
#receipt table textarea {
    width: 100%;
    padding: 5px;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    font-size: 13px;
    color: #2c3e50;
    box-sizing: border-box;
    font-family: inherit;
    background: #f8f9fa;
    resize: vertical;
}

#receipt table input:focus,
#receipt table textarea:focus {
    outline: none;
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.1);
}

#receipt .item-description,
#receipt .item-amount {
    height: 20px;
    resize: vertical;
}

/* Buttons */
#receipt .control-btn,
#receipt #addReceiptItemBtn,
#receipt #saveReceiptBtn,
#receipt #printReceiptBtn,
#receipt #resetReceiptBtn {
    padding: 10px 15px;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    /* font-weight: 500; */
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 10px 0;
}

#receipt .control-btn:hover,
#receipt #addReceiptItemBtn:hover,
#receipt #saveReceiptBtn:hover,
#receipt #printReceiptBtn:hover {
    background-color: #34495e;
    transform: translateY(-1px);
}

#receipt #resetReceiptBtn {
    /* background-color: #f39c12; */
}

#receipt #resetReceiptBtn:hover {
    background-color: #e67e22;
}

#receipt .control-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

#receipt .remove-item {
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    transition: background-color 0.2s ease;
    align-items: center;
    justify-content: center;
}

#receipt .remove-item:hover {
    background-color: #c0392b;
}

/* Payment Method Section */
#receipt .payment-method {
    margin: 5px 0;
    padding: 6px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

#receipt #paymentMethod {
    width: 200px;
    margin-bottom: 5px;
}

/* Signature Section */
#receipt .signature {
    margin: 15px 0;
    /* padding: 15px; */
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

#receipt .receipt-signature-location {
    display: flex;
    justify-content: flex-start;
    /* gap: 5px; */
    margin-bottom: 5px;
}

#receipt .receipt-signature-location input {
    flex: 1;
    padding: 5px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    font-size: 12px;
    color: #2c3e50;
    width: 80px;
}

#receipt #receipt-signature-area {
    margin: 15px 0;
    padding: 15px;
    border: 2px dashed #e1e8ed;
    border-radius: 8px;
    text-align: center;
    background-color: white;
    transition: border-color 0.2s ease;
    width: fit-content;
    cursor: pointer;
}

#receipt #receipt-signature-area:hover {
    border-color: #2c3e50;
}

#receipt #receipt-signature-display {
    max-width: 150px;
    max-height: 60px;
    object-fit: contain;
}

#receipt #receipt-signature-placeholder {
    color: #7f8c8d;
    font-size: 12px;
    text-align: center;
    border-bottom: 1px solid #2c3e50;
    width: 64px;
    height: 16px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

#receipt #receipt-signName {
        padding: 5px;
        border: 1px solid #e1e8ed;
        border-radius: 6px;
        font-size: 14px;
        color: #2c3e50;
        background-color: #fff;
        width: 250px;
}

#receipt .signature-line {
    width: 200px;
    height: 1px;
    background-color: #2c3e50;
    margin-top: 5px;
}

#receipt #receipt-signature-input {
    display: none;
}