/*
 Theme Name:   twentytwentyfive Child
 Theme URI:    http://strib.icucamerasecurity.com/twentytwentyfive-child/
 Description:  Child theme for twentytwentyfive
 Author:       Andra Williams
 Author URI:   http://strib.icucamerasecurity.com
 Template:     twentytwentyfive
 Version:      1.0.0
*/
/*
 * Plugin: STRIB Pest Control
 * Description: Custom styles for the pest control forms and pages.
 */

/* === General Body & Container Styling === */
body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    line-height: 1.6;
}

.pest-control-forms,
.pest-treatment-form,
.pest-invoice-form,
.invoice-search-form,
.treatment-search-form,
.invoice-detail,
.treatment-detail {
    max-width: 900px;
    margin: 30px auto;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* === Headers & Typography === */
.pest-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 15px;
}

.pest-header h2 {
    font-size: 2.2em;
    color: #0056b3;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.pest-header h3 {
    font-size: 1.6em;
    color: #555;
    margin: 5px 0 0;
}

.pest-header h4 {
    font-size: 1em;
    color: #777;
    margin: 5px 0 0;
}

legend {
    font-size: 1.4em;
    font-weight: bold;
    color: #0056b3;
    margin-bottom: 15px;
    padding: 0 10px;
}

/* === Form Elements === */
.pest-form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.pest-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.pest-form-group input[type="text"],
.pest-form-group input[type="email"],
.pest-form-group input[type="tel"],
.pest-form-group input[type="number"],
.pest-form-group input[type="date"],
.pest-form-group textarea,
.pest-form-group select,
.pest-customer-select select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.pest-form-group input:focus,
.pest-form-group textarea:focus,
.pest-form-group select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

.pest-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.pest-form-row .pest-form-group {
    flex: 1;
    margin-bottom: 0;
}

/* === Search Page Forms === */
.invoice-search-form,
.treatment-search-form,
.invoice-filter-form {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    padding: 20px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.invoice-search-form > div,
.treatment-search-form > div,
.invoice-filter-form > div {
    flex-grow: 1;
    min-width: 150px;
}

.invoice-search-form label,
.treatment-search-form label,
.invoice-filter-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.invoice-search-form input,
.treatment-search-form input,
.invoice-filter-form input,
.invoice-filter-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* === Buttons === */
.pest-btn {
    display: inline-block;
    padding: 12px 25px;
    font-size: 1em;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    transition: background-color 0.3s, transform 0.2s;
    white-space: nowrap;
}

.pest-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pest-btn-add {
    background-color: #28a745;
    color: #fff;
}

.pest-btn-add:hover {
    background-color: #218838;
}

.pest-btn-remove {
    background-color: #dc3545;
    color: #fff;
}

.pest-btn-remove:hover {
    background-color: #c82333;
}

/* Base button styles for form submission */
.pest-invoice-form button[type="submit"],
.pest-treatment-form button[type="submit"] {
    background-color: #007bff;
    color: #fff;
}

.pest-invoice-form button[type="submit"]:hover,
.pest-treatment-form button[type="submit"]:hover {
    background-color: #0056b3;
}

.invoice-search-form button,
.treatment-search-form button,
.invoice-filter-form button {
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.invoice-search-form button:hover,
.treatment-search-form button:hover,
.invoice-filter-form button:hover {
    background-color: #0056b3;
}

/* === Messages & Alerts === */
.pest-success {
    padding: 15px;
    margin-bottom: 20px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    font-weight: 500;
}

.pest-error {
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    font-weight: 500;
}

/* === Sections & Fieldsets === */
fieldset {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    background-color: #fafafa;
}

.pest-units-section .pest-unit-block {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #ffffff;
    position: relative;
}

/* === Tables (for lists and details) === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

table th, table td {
    border: 1px solid #e0e0e0;
    padding: 12px;
    text-align: left;
}

table th {
    background-color: #f0f0f0;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.pest-customers-table .pest-actions {
    display: flex;
    gap: 10px;
}

.pest-btn-edit {
    background-color: #ffc107;
    color: #fff;
    padding: 8px 15px;
}

.pest-btn-edit:hover {
    background-color: #e0a800;
}

.pest-btn-delete {
    background-color: #dc3545;
    color: #fff;
    padding: 8px 15px;
}

.pest-btn-delete:hover {
    background-color: #c82333;
}

/* === Search Results Table === */
.invoice-results,
.treatment-results {
    margin-top: 20px;
}

.invoice-results th,
.treatment-results th {
    background-color: #0056b3;
    color: #fff;
    border-color: #004085;
    text-transform: uppercase;
}

.invoice-results tbody tr.even-row,
.treatment-results tbody tr.even-row {
    background-color: #ffffff;
}

.invoice-results tbody tr.odd-row,
.treatment-results tbody tr.odd-row {
    background-color: #f8f9fa;
}


/* === Select2 Customization === */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    min-height: 40px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #007bff !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25) !important;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .pest-form-row {
        flex-direction: column;
    }

    .pest-form-group input,
    .pest-form-group textarea,
    .pest-form-group select {
        font-size: 0.9em;
    }

    .pest-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}