/* --- General Container --- */
.bawr-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    direction: rtl;
    margin: 20px 0;
}
.bawr-district-title {
    border-bottom: 3px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* --- Filters and Search --- */
.bawr-filters {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}
#bawr-search-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}
.bawr-block-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.bawr-block-filters span {
    font-weight: bold;
    color: #555;
}
.bawr-block-filters a {
    text-decoration: none;
    background-color: #fff;
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.2s;
}
.bawr-block-filters a:hover {
    background-color: #005a87;
}

/* --- Plot Sections and Grid --- */
.bawr-plot-section {
    margin-bottom: 30px;
}
.bawr-block-title {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 22px;
}
.bawr-plots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* --- Plot Card --- */
.bawr-plot-card {
    border: 1px solid #e0e0e0;
    border-right: 5px solid;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.bawr-plot-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.bawr-plot-card h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    line-height: 1.4;
}
.bawr-plot-card p {
    margin: 5px 0;
    color: #555;
    font-size: 14px;
}
.bawr-plot-card.empty {
    border-right-color: #9e9e9e;
}
.bawr-plot-card.pending {
    border-right-color: #ff9800;
}
.bawr-plot-card.approved {
    border-right-color: #4CAF50;
}
.bawr-pending-text {
    font-style: italic;
    color: #ff9800;
    font-weight: bold;
}

/* --- Buttons --- */
.bawr-actions {
    margin-top: auto;
    padding-top: 15px;
    display: flex;
    gap: 10px;
}
.bawr-btn {
    cursor: pointer;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    color: white;
    transition: background-color 0.2s;
}
.bawr-add-data-btn {
    background-color: #0073aa;
}
.bawr-add-data-btn:hover {
    background-color: #005a87;
}
.bawr-contact-btn {
    background-color: #4CAF50;
}
.bawr-contact-btn:hover {
    background-color: #45a049;
}
.bawr-report-btn {
    background-color: #f44336;
}
.bawr-report-btn:hover {
    background-color: #da190b;
}

/* --- Popup Forms (Optimized) --- */
#bawr-popup-overlay,
#bawr-report-popup-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

#bawr-popup-form,
#bawr-report-popup-form {
    background: #fff;
    padding: 25px 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;   /* حجم مناسب */
    max-height: 90vh;   /* مايزودش عن طول الشاشة */
    overflow-y: auto;   /* Scroll لو المحتوى طويل */
    position: relative;
    box-sizing: border-box;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

#bawr-close-popup,
#bawr-close-report-popup {
    position: absolute;
    top: 10px; left: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
}
#bawr-popup-form h3,
#bawr-report-popup-form h3 {
    margin-top: 0;
}
#bawr-popup-form label,
#bawr-report-popup-form label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
}
#bawr-popup-form input,
#bawr-popup-form select,
#bawr-popup-form textarea,
#bawr-report-popup-form input,
#bawr-report-popup-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
#bawr-popup-form button[type="submit"] {
    width: 100%;
    margin-top: 20px;
    background-color: #0073aa;
    font-size: 16px;
}
#bawr-report-popup-form button[type="submit"] {
    width: 100%;
    margin-top: 20px;
    background-color: #f44336;
    font-size: 16px;
}
#bawr-form-message,
#bawr-report-form-message {
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
}

/* --- Styles for the new Status Filters --- */
.bawr-status-filters {
    display: flex;
    gap: 8px;
    order: -1;
    flex-basis: 100%;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}
.bawr-status-filter {
    background-color: #f0f0f1;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    color: #555;
    transition: background-color 0.2s, color 0.2s;
}
.bawr-status-filter:hover {
    background-color: #e0e0e0;
}
.bawr-status-filter.active {
    background-color: #0073aa;
    color: white;
}

/* --- Styles for the info text inside popups --- */
#bawr-popup-plot-info,
#bawr-report-plot-info {
    background-color: #f3f3f3;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border-right: 4px solid #0073aa;
    text-align: center;
    font-weight: bold;
}
