/* ══════════════════════════════════════════════
 * WP Handyman Estimates — Public Styles
 * Avada-compatible, Build It Pros branding
 * ══════════════════════════════════════════════ */

:root {
    --hme-gold: #D4A843;
    --hme-gold-hover: #c29a38;
    --hme-charcoal: #333;
    --hme-green: #28a745;
    --hme-red: #dc3545;
    --hme-gray: #787c82;
    --hme-light: #f9f9f9;
    --hme-border: #e0e0e0;
}

/* ── Request Form ── */

.hme-request-form-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding: 0;
}

.hme-form-title {
    font-size: 28px;
    color: var(--hme-charcoal);
    margin: 0 0 5px;
}

.hme-form-subtitle {
    color: var(--hme-gray);
    margin: 0 0 25px;
}

.hme-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.hme-form-field-full {
    grid-column: 1 / -1;
}

.hme-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--hme-charcoal);
    font-size: 14px;
}

.hme-required {
    color: var(--hme-red);
}

.hme-form-field input[type="text"],
.hme-form-field input[type="email"],
.hme-form-field input[type="tel"],
.hme-form-field select,
.hme-form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--hme-border);
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    color: var(--hme-charcoal);
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.hme-form-field input:focus,
.hme-form-field select:focus,
.hme-form-field textarea:focus {
    border-color: var(--hme-gold);
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 168, 67, 0.15);
}

.hme-form-field input[type="file"] {
    font-size: 14px;
}

.hme-form-help {
    font-size: 12px;
    color: var(--hme-gray);
    margin: 4px 0 0;
}

.hme-form-actions {
    margin-top: 24px;
}

/* ── Buttons ── */

.hme-btn {
    display: inline-block;
    padding: 12px 32px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    text-decoration: none;
}

.hme-btn:active {
    transform: scale(0.98);
}

.hme-btn-primary {
    background: var(--hme-gold);
    color: #fff;
}

.hme-btn-primary:hover {
    background: var(--hme-gold-hover);
    color: #fff;
}

.hme-btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.hme-btn-accept {
    background: var(--hme-green);
    color: #fff;
}

.hme-btn-accept:hover {
    background: #218838;
    color: #fff;
}

.hme-btn-decline {
    background: #fff;
    color: var(--hme-red);
    border: 1px solid var(--hme-red);
}

.hme-btn-decline:hover {
    background: var(--hme-red);
    color: #fff;
}

/* ── Form Messages ── */

.hme-form-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}

.hme-form-message.hme-msg-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.hme-form-message.hme-msg-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.hme-form-success {
    text-align: center;
    padding: 40px 20px;
}

.hme-success-icon {
    width: 60px;
    height: 60px;
    background: var(--hme-green);
    color: #fff;
    font-size: 30px;
    line-height: 60px;
    border-radius: 50%;
    margin: 0 auto 15px;
}

.hme-form-success h3 {
    font-size: 22px;
    color: var(--hme-charcoal);
    margin: 0 0 10px;
}

/* ══════════════════════════════════════════════
 * Estimate View (customer-facing)
 * ══════════════════════════════════════════════ */

.hme-estimate-view {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--hme-charcoal);
}

/* Header */

.hme-ev-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 3px solid var(--hme-gold);
    padding-bottom: 20px;
    margin-bottom: 25px;
    gap: 20px;
}

.hme-ev-logo {
    max-height: 60px;
    max-width: 250px;
}

.hme-ev-company {
    font-size: 24px;
    margin: 0;
    color: var(--hme-charcoal);
}

.hme-ev-tagline {
    font-size: 12px;
    color: var(--hme-gold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 4px 0 0;
}

.hme-ev-meta {
    text-align: right;
    flex-shrink: 0;
}

.hme-ev-title {
    font-size: 28px;
    margin: 0;
    color: var(--hme-charcoal);
}

.hme-ev-number {
    font-size: 14px;
    color: var(--hme-gray);
    margin: 2px 0;
}

.hme-ev-date,
.hme-ev-expires {
    font-size: 13px;
    color: var(--hme-gray);
    margin: 2px 0;
}

/* Status badges */

.hme-ev-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.hme-ev-status-sent     { background: #e0eaf5; color: #1e5a96; }
.hme-ev-status-accepted { background: #d4edda; color: #155724; }
.hme-ev-status-declined { background: #f8d7da; color: #721c24; }
.hme-ev-status-expired  { background: #f0f0f0; color: #888; }

/* Info Grid */

.hme-ev-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.hme-ev-info-block h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--hme-gray);
    margin: 0 0 8px;
    border-bottom: 1px solid var(--hme-border);
    padding-bottom: 4px;
}

/* Items Table */

.hme-ev-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.hme-ev-table th {
    background: var(--hme-charcoal);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hme-ev-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

.hme-ev-table tr:nth-child(even) {
    background: var(--hme-light);
}

.hme-ev-right {
    text-align: right;
}

.hme-ev-section-row td {
    background: #f5f5f5 !important;
    font-weight: 700;
    padding-top: 14px;
}

/* Totals */

.hme-ev-totals {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px;
}

.hme-ev-totals table {
    width: 280px;
    border-collapse: collapse;
}

.hme-ev-totals td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
}

.hme-ev-total-row td {
    border-top: 2px solid var(--hme-charcoal);
    border-bottom: none;
    font-size: 18px;
    padding-top: 12px;
}

/* Notes */

.hme-ev-notes {
    background: var(--hme-light);
    padding: 15px 20px;
    border-left: 3px solid var(--hme-gold);
    border-radius: 4px;
    margin-bottom: 25px;
}

.hme-ev-notes h3 {
    margin: 0 0 8px;
    font-size: 14px;
}

/* Accept / Decline */

.hme-ev-actions {
    text-align: center;
    padding: 25px;
    background: var(--hme-light);
    border-radius: 6px;
    margin-bottom: 25px;
    border: 1px solid var(--hme-border);
}

.hme-ev-actions p {
    margin: 0 0 15px;
    color: var(--hme-gray);
}

.hme-ev-action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.hme-ev-response-notice {
    text-align: center;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 25px;
    font-weight: 600;
}

.hme-ev-accepted-notice {
    background: #d4edda;
    color: #155724;
}

.hme-ev-declined-notice {
    background: #f8d7da;
    color: #721c24;
}

.hme-ev-expired-notice {
    background: #f0f0f0;
    color: #888;
}

/* Footer */

.hme-ev-footer {
    border-top: 1px solid var(--hme-border);
    padding-top: 15px;
    text-align: center;
    font-size: 13px;
    color: var(--hme-gray);
}

.hme-ev-footer p {
    margin: 4px 0;
}

/* ── Responsive ── */

@media screen and (max-width: 600px) {
    .hme-form-grid {
        grid-template-columns: 1fr;
    }

    .hme-ev-header {
        flex-direction: column;
    }

    .hme-ev-meta {
        text-align: left;
    }

    .hme-ev-info-grid {
        grid-template-columns: 1fr;
    }

    .hme-ev-table th:nth-child(3),
    .hme-ev-table td:nth-child(3),
    .hme-ev-table th:nth-child(4),
    .hme-ev-table td:nth-child(4) {
        display: none;
    }

    .hme-ev-action-buttons {
        flex-direction: column;
    }

    .hme-ev-action-buttons .hme-btn {
        width: 100%;
    }
}

/* ══════════════════════════════════════════════
 * Teaser / Registration Gate
 * ══════════════════════════════════════════════ */

.hme-ev-teaser-notice {
    text-align: center;
    padding: 28px 24px;
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e7 100%);
    border: 2px solid var(--hme-gold);
    border-radius: 8px;
    margin-bottom: 24px;
}

.hme-ev-teaser-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.hme-ev-teaser-notice h3 {
    font-size: 20px;
    margin: 0 0 8px;
    color: var(--hme-charcoal);
}

.hme-ev-teaser-notice p {
    color: var(--hme-gray);
    margin: 0 0 16px;
}

.hme-btn-unlock {
    font-size: 17px;
    padding: 14px 36px;
}

.hme-ev-teaser-cta-alt {
    font-size: 14px;
    margin: 0;
}

.hme-ev-items-teaser .hme-ev-teaser-row td {
    color: var(--hme-charcoal);
}

.hme-teaser-lock {
    font-size: 11px;
    opacity: 0.5;
    margin-left: 4px;
}

.hme-teaser-blur {
    color: #bbb;
}

.hme-teaser-redacted {
    color: #ccc;
    letter-spacing: 2px;
}

.hme-ev-teaser-total-block {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
    border-top: 2px solid var(--hme-charcoal);
    margin-bottom: 24px;
}

.hme-ev-teaser-total-label {
    font-size: 18px;
    font-weight: 700;
}

.hme-ev-teaser-total-value {
    font-size: 15px;
    color: var(--hme-gray);
    font-style: italic;
}

/* ── Registration Page ── */

.hme-register-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 0;
}

.hme-register-header {
    margin-bottom: 28px;
}

.hme-register-header h2 {
    font-size: 28px;
    margin: 0 0 8px;
}

.hme-register-expiry {
    font-size: 13px;
    color: var(--hme-gray);
    margin-top: 8px;
}

.hme-register-login-hint {
    margin-top: 20px;
    font-size: 14px;
    color: var(--hme-gray);
    text-align: center;
}

.hme-register-already-in {
    text-align: center;
    padding: 40px 20px;
}

/* ── Contact Log (admin) ── */

.hme-log-entry {
    padding: 12px;
    border: 1px solid var(--hme-border);
    border-radius: 4px;
    margin-bottom: 10px;
    background: #fafafa;
}

.hme-log-meta {
    font-size: 12px;
    margin-bottom: 6px;
    color: var(--hme-gray);
}

.hme-log-note {
    font-size: 14px;
    line-height: 1.5;
}

.hme-log-attachments {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hme-log-attachment {
    font-size: 12px;
    padding: 2px 8px;
    background: #e8f0fe;
    border-radius: 3px;
    text-decoration: none;
    color: var(--hme-blue);
}
