/**
 * استایل‌های بخش عمومی پلاگین
 *
 * @since      1.0.0
 */

/* استایل‌های کانتینر اصلی */
.iran-branch-locator-container {
    margin: 20px 0;
    font-family: Tahoma, Arial, sans-serif;
    direction: rtl;
    text-align: right;
}

/* استایل‌های نقشه */
.iran-branch-map-container {
    margin-bottom: 30px;
}

.iran-branch-map-container h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.iran-branch-map {
    width: 100%;
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f9f9f9;
    position: relative;
}

/* استایل‌های نقشه SVG */
.iran-branch-map svg {
    width: 100%;
    height: 100%;
    display: block;
}

.iran-branch-map svg path {
    fill: #e0e0e0;
    stroke: #fff;
    stroke-width: 1px;
    transition: fill 0.3s ease;
    cursor: pointer;
}

.iran-branch-map svg path:hover {
    fill: #4CAF50;
}

.iran-branch-map svg path.has-branch {
    fill: #4CAF50;
}

.iran-branch-map svg path.active {
    fill: #2196F3;
}

/* استایل تولتیپ استان */
.province-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    transform: translateX(-50%);
}

.province-tooltip:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

/* استایل‌های راهنمای نقشه */
.iran-branch-map-legend {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.iran-branch-map-legend p {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.legend-item {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 5px;
    border-radius: 3px;
    vertical-align: middle;
}

/* استایل‌های جدول */
.iran-branch-table-container {
    margin-top: 20px;
}

.iran-branch-table-container h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.iran-branch-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-family: Vazir !important;
}

.iran-branch-filters .filter-group {
    flex: 1;
    min-width: 200px;
}

.iran-branch-filters label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.iran-branch-filters select,
.iran-branch-filters input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
}

.iran-branch-filters select:focus,
.iran-branch-filters input[type="text"]:focus {
    border-color: #D69C4B30;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.iran-branch-filters select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.reset-filters {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.reset-filters:hover {
    background-color: #d32f2f;
}

/* استایل‌های جدول نمایندگی‌ها */
.iran-branch-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.iran-branch-table th,
.iran-branch-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: right;
}

.iran-branch-table th {
    background-color: #D69C4B30;
    color: #D79D4B;
    font-weight: bold;
}

.iran-branch-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.iran-branch-table tr:hover {
    background-color: #f1f1f1;
}

.branch-details-link {
    display: inline-block;
    padding: 5px 10px;
    background-color: #D69C4B30;
    color: #D79D4B;
    text-decoration: none;
    border-radius: 4px;
    font-size: 10px;
    transition: background-color 0.3s;
    text-decoration: none !important;
}

.branch-details-link:hover {
    background-color: #D79D4B;
    color: white;
}

/* استایل‌های پاپ‌آپ نقشه لیفلت */
.branch-popup {
    text-align: right;
    direction: rtl;
    min-width: 200px;
}

.branch-popup h4 {
    margin: 0 0 10px 0;
    color: #4CAF50;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.branch-popup p {
    margin: 5px 0;
    font-size: 13px;
}

.branch-popup a {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: background-color 0.3s;
}

.branch-popup a:hover {
    background-color: #0b7dda;
}

/* استایل‌های پاسخگو */
@media screen and (max-width: 768px) {
    .iran-branch-filters .filter-group {
        flex: 100%;
        min-width: 100%;
    }
    
    .iran-branch-map {
        height: 400px;
    }
    
    .iran-branch-table th,
    .iran-branch-table td {
        padding: 8px 5px;
        font-size: 13px;
    }
}

/* استایل‌های لودینگ */
.iran-branch-table-container.loading:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

.iran-branch-table-container.loading:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -25px 0 0 -25px;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #D69C4B30;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}