/* ============================================================
   TRC CRM - Front End Styles
   Add to Beaver Builder Child Theme style.css
   ============================================================ */

/* Page wrapper */
.trc-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: Arial, sans-serif;
}

/* Toolbar */
.trc-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.trc-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s;
    line-height: 1.5;
}
.trc-btn:hover { opacity: 0.85; text-decoration: none; }
.trc-btn-primary   { background: #1A1A1A; color: #fff; }
.trc-btn-secondary { background: #6c757d; color: #fff; }
.trc-btn-success   { background: #84BD00; color: #1A1A1A; }
.trc-btn-sm        { padding: 4px 10px; font-size: 13px; }

/* Search & Filter */
.trc-search-form,
.trc-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    width: 100%;
}
.trc-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    width: 100%;
}
.trc-search-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
.trc-select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    min-width: 160px;
}
.trc-date-input {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
.trc-filters {
    background: #f5f7f7;
    border: 1px solid #e0e4e4;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}

/* Results count */
.trc-results-count {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

/* Tables */
.trc-table-wrap {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #e0e4e4;
}
.trc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.trc-table th {
    background: #1A1A1A;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}
.trc-table td {
    padding: 9px 14px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
.trc-table tbody tr:hover { background: #f5f7f7; }
.trc-table tbody tr:last-child td { border-bottom: none; }

/* Detail table */
.trc-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.trc-detail-table th {
    width: 35%;
    padding: 7px 10px;
    text-align: left;
    color: #555;
    font-weight: 600;
    vertical-align: top;
    border-bottom: 1px solid #eee;
}
.trc-detail-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

/* Cards */
.trc-record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
.trc-card {
    background: #fff;
    border: 1px solid #e0e4e4;
    border-radius: 6px;
    padding: 20px;
}
.trc-card-full {
    grid-column: 1 / -1;
}
.trc-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #84BD00;
}

/* Dashboard */
.trc-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px 0;
}
.trc-dashboard-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1A1A1A;
    color: #fff;
    border-radius: 8px;
    padding: 30px 20px;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    min-height: 120px;
}
.trc-dashboard-btn:hover { color: #1A1A1A !important;
    background: #84BD00;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}
.trc-dashboard-icon { font-size: 32px; margin-bottom: 10px; }
.trc-dashboard-label { font-size: 15px; font-weight: 600; text-align: center; }

/* Pagination */
.trc-pagination {
    display: flex;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.trc-page-btn {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    background: #fff;
}
.trc-page-btn:hover { background: #f5f7f7; }
.trc-page-active { background: #1A1A1A; color: #fff; border-color: #1A1A1A; }
.trc-page-ellipsis { display: inline-block; padding: 6px 4px; color: #888; font-size: 13px; }

/* No results */
.trc-no-results {
    text-align: center;
    color: #888;
    padding: 40px;
    font-size: 15px;
}

/* Responsive */
@media ( max-width: 768px ) {
    .trc-record-grid { grid-template-columns: 1fr; }
    .trc-dashboard { grid-template-columns: repeat(2, 1fr); }
    .trc-filter-row { flex-direction: column; align-items: stretch; }
    .trc-select, .trc-search-input { min-width: unset; width: 100%; }
}


/* ============================================================
   ACF Front End Form Overrides
   ============================================================ */

/* Submit button */
.acf-form .acf-btn,
.acf-form input[type="submit"],
.acf-form button[type="submit"] {
    background: #1A1A1A !important;
    border-color: #1A1A1A !important;
    color: #fff !important;
    border-radius: 4px !important;
    padding: 8px 20px !important;
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: opacity 0.2s !important;
}
.acf-form .acf-btn:hover,
.acf-form input[type="submit"]:hover,
.acf-form button[type="submit"]:hover {
    opacity: 0.85 !important;
    background: #1A1A1A !important;
}

/* Field labels */
.acf-form .acf-label label {
    color: #1A1A1A !important;
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* Input fields */
.acf-form input[type="text"],
.acf-form input[type="email"],
.acf-form input[type="number"],
.acf-form input[type="url"],
.acf-form textarea,
.acf-form select {
    border-color: #ccc !important;
    border-radius: 4px !important;
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    color: #1A1A1A !important;
    padding: 8px 10px !important;
}

/* Focus state */
.acf-form input[type="text"]:focus,
.acf-form input[type="email"]:focus,
.acf-form input[type="number"]:focus,
.acf-form input[type="url"]:focus,
.acf-form textarea:focus,
.acf-form select:focus {
    border-color: #84BD00 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(132, 189, 0, 0.2) !important;
}

/* Required asterisk */
.acf-form .acf-required {
    color: #84BD00 !important;
}

/* Field group title */
.acf-form .acf-fields > .acf-field {
    border-color: #eee !important;
}

/* True/false toggle */
.acf-form .acf-switch.-on {
    background: #84BD00 !important;
    border-color: #84BD00 !important;
}

/* Repeater add row button */
.acf-form .acf-repeater .acf-actions .acf-button {
    background: #84BD00 !important;
    border-color: #84BD00 !important;
    color: #1A1A1A !important;
}

/* Post title field label */
.acf-form .acf-field-post-title .acf-label label {
    font-size: 15px !important;
}

/* Success message */
.acf-form .acf-notice.-success {
    background: #f0f9e0 !important;
    border-color: #84BD00 !important;
    color: #1A1A1A !important;
}

/* Error message */
.acf-form .acf-notice.-warning,
.acf-form .acf-notice.-error {
    border-color: #cc0000 !important;
}

/* ============================================================
   GRAVITY FORMS — Submit Button
   ============================================================ */
.gform_button,
.gform_button[type="submit"],
input.gform_button {
    background: #1A1A1A !important;
    color: #fff !important;
    border: 2px solid #1A1A1A !important;
    padding: 10px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: Arial, sans-serif !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: background 0.2s, color 0.2s !important;
    display: inline-block !important;
    width: auto !important;
}

.gform_button:hover,
.gform_button[type="submit"]:hover,
input.gform_button:hover {
    background: #84BD00 !important;
    color: #1A1A1A !important;
    border-color: #84BD00 !important;
}
