/* ============================
   استایل‌های نقشه گواه
   ============================ */

/* کانتینر اصلی */
.govah-map-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    direction: rtl;
    font-family: Tahoma, Arial, sans-serif;
}

/* شمارنده */
.govah-counter-wrapper {
    text-align: center;
    margin-bottom: 30px;
}

.govah-counter {
    display: inline-block;
    padding: 25px 50px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
    color: white;
}

.govah-counter-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 5px;
}

.govah-counter-label {
    font-size: 16px;
    opacity: 0.95;
}

/* کانتینر نقشه */
.govah-map-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* لودینگ */
.govah-map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 100;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.govah-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* SVG نقشه */
#govah-map-svg {
    width: 100%;
    height: 100%;
    display: block;
}

#govah-map-svg path,
#govah-map-svg polygon {
    fill: #e0e0e0;
    stroke: #ffffff;
    stroke-width: 1.5;
    transition: all 0.3s ease;
    cursor: pointer;
}

#govah-map-svg path:hover,
#govah-map-svg polygon:hover {
    fill: #4CAF50 !important;
    opacity: 0.8;
    stroke-width: 2;
}

/* استان‌های فعال */
.govah-heatmap-active {
    fill: #4CAF50 !important;
    opacity: 0.7;
}

/* لایه نقاط */
.govah-points-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.govah-point {
    fill: #4CAF50;
    opacity: 0;
    animation: fadeInPoint 0.8s ease forwards;
    pointer-events: all;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.govah-point:hover {
    r: 8;
    opacity: 1 !important;
}

@keyframes fadeInPoint {
    to { opacity: 1; }
}

/* Tooltip */
.govah-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 99999;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    line-height: 1.6;
}

.govah-tooltip strong {
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
}

/* راهنما */
.govah-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.govah-legend-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
    color: #333;
}

.govah-legend-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.govah-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.govah-legend-color {
    width: 35px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* اعلان‌ها */
.govah-notifications {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9998;
    max-width: 350px;
}

.govah-notification {
    background: white;
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    opacity: 0;
    transform: translateX(-120%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-right: 4px solid #4CAF50;
}

.govah-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.govah-notification-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

.govah-notification-content strong {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 3px;
}

.govah-notification-content small {
    color: #666;
    font-size: 12px;
}

.govah-notification-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.govah-notification-close:hover {
    color: #333;
}

/* مودال */
.govah-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.govah-modal {
    background: white;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    border-radius: 12px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.govah-modal-header {
    padding: 20px 25px;
    background: #4CAF50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.govah-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.govah-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    transition: opacity 0.2s;
}

.govah-modal-close:hover {
    opacity: 0.8;
}

.govah-modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.govah-modal-count {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
}

.govah-modal-count strong {
    color: #4CAF50;
    font-size: 20px;
}

.govah-orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.govah-order-item {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
}

.govah-order-item:hover {
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.govah-order-info strong {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.govah-order-info small {
    color: #666;
    font-size: 12px;
    margin-right: 10px;
}

.govah-order-product {
    margin: 8px 0;
    color: #555;
    font-size: 13px;
}

.govah-order-time {
    font-size: 11px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .govah-map-container {
        height: 400px;
    }
    
    .govah-counter-number {
        font-size: 36px;
    }
    
    .govah-counter-label {
        font-size: 14px;
    }
    
    .govah-legend {
        bottom: 10px;
        right: 10px;
        padding: 10px 15px;
    }
    
    .govah-notifications {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
    
    .govah-notification {
        padding: 12px 15px;
    }
    
    .govah-modal {
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .govah-map-container {
        height: 350px;
        border-radius: 8px;
    }
    
    .govah-counter {
        padding: 20px 30px;
    }
    
    .govah-counter-number {
        font-size: 32px;
    }
}