/* Main Tools Container */
.sut-tool-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    color: #333;
}

/* Controls */
.sut-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Buttons */
.sut-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sut-btn-primary {
    background-color: #E3342F;
    /* ilovepdf red-ish */
    color: white;
}

.sut-btn-primary:hover {
    background-color: #CC1F1A;
}

.sut-btn-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

.sut-btn-secondary:hover {
    background-color: #e2e8f0;
}

.sut-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.sut-btn-icon {
    background: none;
    border: none;
    color: #EF4444;
    cursor: pointer;
    font-size: 16px;
}

/* Invoice Paper Look */
.invoice-paper {
    background: white;
    padding: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    min-height: 800px;
}

/* Layout */
.invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.company-logo-section {
    width: 300px;
}

#logo-placeholder {
    width: 150px;
    height: 80px;
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 10px;
}

#logo-preview {
    max-width: 200px;
    max-height: 100px;
    margin-bottom: 10px;
    cursor: pointer;
}

.invoice-meta {
    text-align: right;
}

.invoice-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 20px 0;
    color: #1f2937;
    text-transform: uppercase;
}

.meta-row {
    margin-bottom: 8px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

/* Editable Inputs */
.editable-input {
    border: 1px solid transparent;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: inherit;
    transition: 0.2s;
}

.editable-input:hover,
.editable-input:focus {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.header-input {
    text-align: right;
    width: 140px;
}

.editable-field {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    overflow: hidden;
}

.editable-field:hover,
.editable-field:focus {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.company-name {
    font-weight: 700;
    font-size: 18px;
    height: 30px;
    margin-bottom: 5px;
}

.company-details {
    height: 60px;
    color: #64748b;
}

.client-details {
    height: 80px;
    background: #f8fafc;
}

/* Table */
.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.invoice-items-table th {
    background-color: #1f2937;
    color: white;
    padding: 10px;
    text-align: left;
    font-size: 14px;
}

.invoice-items-table td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.invoice-items-table input {
    width: 100%;
}

.col-desc {
    width: 45%;
}

.col-qty {
    width: 10%;
}

.col-rate {
    width: 15%;
}

.col-amount {
    width: 15%;
    text-align: right;
}

.col-action {
    width: 5%;
}

.item-amount {
    text-align: right;
    font-weight: 600;
}

/* Totals */
.invoice-totals {
    width: 300px;
    margin-left: auto;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.grand-total {
    font-size: 18px;
    font-weight: 800;
    border-bottom: 2px solid #1f2937;
    margin-top: 10px;
}

.short-input {
    width: 80px;
    text-align: right;
}

/* Notes */
.invoice-notes {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.invoice-notes h3 {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 10px;
}

.notes-field {
    height: 60px;
    color: #475569;
}

/* Print Media */
@media print {
    body * {
        visibility: hidden;
    }

    #invoice-preview,
    #invoice-preview * {
        visibility: visible;
    }

    #invoice-preview {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        padding: 0;
    }

    .hide-on-print {
        display: none !important;
    }

    .editable-input,
    .editable-field {
        border: none !important;
        background: transparent !important;
    }
}

/* ===========================
   Freight Calculator Styles
   =========================== */
.freight-layout {
    display: flex;
    gap: 20px;
}

@media (max-width: 768px) {
    .freight-layout {
        flex-direction: column;
    }
}

.sut-card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.freight-inputs {
    flex: 1;
}

.freight-results {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 14px;
}

.sut-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
}

.sut-input:focus {
    outline: none;
    border-color: #E3342F;
}

.form-group-row {
    display: flex;
    gap: 10px;
}

.form-group.half {
    flex: 1;
}

.result-card {
    background: #1f2937;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.result-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.profit-card {
    background: #10b981;
}

/* Green for profit */
.big-number {
    font-size: 42px;
    font-weight: 800;
}

.mid-number {
    font-size: 28px;
    font-weight: 700;
}

.expenses-text {
    color: #fca5a5;
}

.result-grid {
    display: flex;
    gap: 10px;
}

.result-grid .result-card {
    flex: 1;
}

.breakdown-list h3 {
    margin-top: 0;
    font-size: 16px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

/* ===========================
   Word Counter Styles
   =========================== */
.wc-textarea {
    width: 100%;
    height: 300px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 20px;
    font-family: inherit;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

.wc-textarea:focus {
    outline: none;
    border-color: #E3342F;
}

.wc-stats-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.wc-stat-item {
    flex: 1;
    min-width: 100px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.wc-stat-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.wc-stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
}

.wc-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.wc-detail-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.wc-detail-card h3 {
    margin-top: 0;
    font-size: 14px;
    color: #64748b;
}

.wc-detail-card p {
    font-size: 18px;
    font-weight: 700;
    color: #334155;
    margin: 0;
}

.keywords-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.keywords-card li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
    border-bottom: 1px dashed #cbd5e1;
}

.keywords-card .badge {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}