/* Wrapper */
.torf-calculator-wrapper {
    max-width: 800px;
    margin: 20px auto;
    /* Use theme default font, fallback to system sans-serif */
    font-family: inherit; 
    color: #333;
}

/* Product List Table-like structure */
.torf-product-header, .torf-product-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.torf-product-header {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    color: #555;
}

.torf-col-name {
    flex: 2;
    padding-right: 10px;
}

.torf-col-price {
    flex: 1;
    text-align: right;
    padding-right: 20px;
    white-space: nowrap;
}

.torf-col-qty {
    flex: 0 0 90px;
    text-align: right;
}

.torf-qty-input {
    width: 100%;
    max-width: 70px;
    padding: 8px 4px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Grand Total Section */
.torf-grand-total-section {
    background-color: #f4f7f9;
    padding: 20px 25px;
    margin: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
}

.torf-grand-total-section h3 {
    margin: 0;
    font-size: 1.3em;
    text-transform: uppercase;
    color: #444;
}
.torf-grand-total-section small {
    font-size: 0.7em;
    color: #777;
    font-weight: normal;
    text-transform: none;
}

.total-display {
    font-size: 1.8em;
    font-weight: bold;
    color: #222;
}

/* Customer Form Layout */
.torf-customer-info h3 {
    margin-bottom: 25px;
    font-size: 1.5em;
}

/* Form Row Styles - NEW (Fixes Tabbing) */
.torf-two-col-row {
    display: flex;
    flex-direction: column; /* Mobile default: stack */
    gap: 15px;
    margin-bottom: 15px;
    width: 100%;
}

/* Desktop: side by side */
@media (min-width: 768px) {
    .torf-two-col-row {
        flex-direction: row;
        gap: 40px; /* Space between left and right items */
    }
    .torf-col-half {
        flex: 1;
        width: 50%;
    }
}

/* Form Fields Styles */
.torf-field-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.torf-field-group label,
.torf-full-width-field label:not(.checkbox-label) {
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.95em;
    color: #555;
}

/* Standard WP input styling cues */
.torf-field-group input[type="text"],
.torf-field-group input[type="tel"],
.torf-field-group input[type="email"],
.torf-full-width-field textarea {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box; /* Ensure padding doesn't affect width */
}

.torf-full-width-field {
    margin-top: 20px;
    margin-bottom: 15px;
    width: 100%;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: bold !important;
    font-size: 0.9em;
    cursor: pointer;
    user-select: none;
    text-transform: uppercase;
    color: #777;
}

.checkbox-label input {
    margin-right: 10px;
}

/* Shipping Container Spacing */
#torf-shipping-address-container {
    margin-top: 20px;
    padding-left: 25px;
    border-left: 2px solid #eee;
}

/* Actions & Messages */
.torf-form-actions {
    margin-top: 30px;
}

#torf-submit-btn {
    background-color: #6a9b6a;
    color: white;
    border: none;
    padding: 12px 35px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-transform: uppercase;
}

#torf-submit-btn:hover {
    background-color: #588358;
}

#torf-submit-btn:disabled {
    background-color: #aaa;
    cursor: not-allowed;
    opacity: 0.7;
}

#torf-form-message {
    margin-top: 25px;
    padding: 15px;
    border-radius: 4px;
    display: none;
}
#torf-form-message.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; display: block; }
#torf-form-message.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; display: block; }

/* Utility Class */
.hidden {
    display: none !important;
}