/* /tools/project-price-estimator/style.css */

/* --- Toolbar (Save & Title) --- */
.ac-tool-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 2em;
    background: var(--color-surface);
    padding: 15px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.ac-plan-name-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--color-heading);
    font-size: 1.25em;
    font-weight: 700;
    padding: 5px 0;
    transition: all 0.3s ease;
}

.ac-plan-name-input:focus,
.ac-plan-name-input:hover {
    outline: none;
    border-bottom-color: var(--color-border);
}

.ac-toolbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ac-toolbar-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ac-row-flex {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.ac-row-flex>div {
    flex: 1;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .ac-tool-toolbar {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        gap: 12px;
    }

    .ac-plan-name-input {
        font-size: 1.1em;
        text-align: center;
        border-bottom-color: var(--color-border);
    }

    .ac-toolbar-actions {
        justify-content: center;
    }

    .ac-toolbar-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .ac-row-flex {
        flex-direction: column;
        gap: 10px;
    }
}

/* --- Custom Tool Assets --- */

/* --- Forms & Inputs --- */
.ac-input-group {
    margin-bottom: 1.5em;
}

.ac-sub-label {
    font-size: 0.85em;
    color: var(--color-text-secondary);
    margin-top: 5px;
    display: block;
}


/* --- Dynamic List --- */
#actb-material-list {
    margin-bottom: 1em;
}

.ac-dynamic-row {
    display: grid;
    grid-template-columns: 3fr 1fr 40px;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.ac-btn-remove {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fee;
    background: #fff5f5;
    color: #e53e3e;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.ac-btn-remove:hover {
    background: #e53e3e;
    color: #fff;
    border-color: #e53e3e;
}


/* --- Results / Quote Card --- */
.ac-results-box {
    margin-top: 2em;
    position: relative;
}

.ac-quote-card {
    background: #fff;
    /* Always white for paper look */
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 2em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ac-quote-header {
    border-bottom: 2px solid var(--color-heading);
    margin-bottom: 1.5em;
    padding-bottom: 1em;
}

.ac-quote-table {
    width: 100%;
    border-collapse: collapse;
}

.ac-quote-table th,
.ac-quote-table td {
    padding: 0.8em;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.ac-quote-table th.ac-section-head {
    background: #f9f9f9;
    font-weight: 700;
    color: var(--color-heading);
}

.ac-quote-table .ac-subtotal td {
    font-weight: 600;
    background: #fafafa;
}

.ac-quote-table .ac-final-row td {
    font-size: 1.2em;
    font-weight: 800;
    color: var(--color-primary);
    border-top: 2px solid var(--color-primary);
}


/* Print */
.ac-print-only {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }

    .ac-print-only,
    .ac-print-only * {
        visibility: visible;
    }

    .ac-print-only {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 40px;
        background: #fff;
    }
}