/* Основні стилі сайту */
:root {
  --primary-color: #4CAF50;
  --secondary-color: #45a049;
  --text-color: #333;
  --light-bg: #f9f9f9;
  --error-color: #e74c3c;
  --success-color: #27ae60;
  --warning-color: #f39c12;
}

body {
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  background-color: var(--light-bg);
}

/* Глобальні стилі кнопок */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
}

/* Стилі для Dashboard Grid */
#user-dashboard-grid .card {
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #e9ecef;
}

#user-dashboard-grid .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Стилі для статистики */
.dashboard-stat {
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  text-align: center;
}

.dashboard-stat .h4 {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

/* Стилі для статистичних блоків */
#user-dashboard-grid .text-center.p-2 {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  border: 1px solid #e0e0e0;
  transition: all 0.2s;
}

#user-dashboard-grid .text-center.p-2:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%) !important;
  transform: scale(1.02);
}

/* Іконки для різних типів статистики */
#user-dashboard-grid .text-success {
  color: #198754 !important;
}

#user-dashboard-grid .text-info {
  color: #0dcaf0 !important;
}

/* Стилі для кнопок в картці ресурсів */
#user-dashboard-grid .btn-sm {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-weight: 500;
}

/* Стиль для Viber-кнопки */
.btn-outline-primary {
  color: #7360f2; /* Колір Viber */
  border-color: #7360f2;
}

.btn-outline-primary:hover {
  color: white;
  background-color: #7360f2;
  border-color: #7360f2;
}

/* Dashboard Cards Styles */
.dashboard-primary-card {
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-left: 4px solid #198754;
}

.dashboard-primary-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.dashboard-secondary-card {
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
  border-left: 4px solid #198754;
}

.dashboard-secondary-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.dashboard-quick-card {
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  background: #fff;
}

.dashboard-quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.dashboard-requests-card {
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  background: #fff;
}

/* Dashboard Icon Wrapper */
.dashboard-icon-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(25, 135, 84, 0.1) 0%, rgba(25, 135, 84, 0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dashboard Statistics */
.dashboard-stat-item {
  padding: 0.5rem;
}

.dashboard-stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: #198754;
  line-height: 1;
}

.dashboard-stat-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

/* Dashboard Section Title */
.dashboard-section-title {
  color: #495057;
  font-weight: 600;
  position: relative;
  padding-bottom: 0.5rem;
}

.dashboard-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #198754, #20c997);
  border-radius: 2px;
}

/* Responsive Design for Dashboard */
@media (max-width: 768px) {
  .dashboard-icon-wrapper {
    width: 60px;
    height: 60px;
  }
  
  .dashboard-primary-card:hover,
  .dashboard-secondary-card:hover,
  .dashboard-quick-card:hover {
    transform: translateY(-2px);
  }
}

/* Стиль для Telegram-кнопки */
.btn-outline-telegram {
  color: #0088cc; /* Фірмовий колір Telegram */
  border-color: #0088cc;
}

.btn-outline-telegram:hover {
  color: white;
  background-color: #0088cc;
  border-color: #0088cc;
}

/* Інші глобальні стилі */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Видалимо файл background-fix.css і додамо стилі сюди */
.feature-card {
  transition: transform 0.3s;
  border-radius: 8px;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* ===== СТИЛІ ДЛЯ СЕКЦІЇ ЗАПИТІВ КОРИСТУВАЧА ===== */
#user-requests-section {
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.request-item {
  transition: all 0.2s ease;
  background-color: #fff;
}

.request-item:hover {
  background-color: #f8f9fa;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.badge.bg-success-subtle {
  background-color: rgba(76, 175, 80, 0.1) !important;
  color: #2e7d32 !important;
  font-weight: 500;
  font-size: 0.75rem;
}

.badge.bg-primary-subtle {
  background-color: rgba(13, 110, 253, 0.1) !important;
  color: #0a58ca !important;
}

.badge.bg-info-subtle {
  background-color: rgba(13, 202, 240, 0.1) !important;
  color: #055160 !important;
}

.badge.bg-warning-subtle {
  background-color: rgba(255, 193, 7, 0.1) !important;
  color: #664d03 !important;
}

.badge.bg-secondary-subtle {
  background-color: rgba(108, 117, 125, 0.1) !important;
  color: #495057 !important;
}

/* Адаптивні стилі для мобільних */
@media (max-width: 768px) {
  #user-requests-section {
    margin: 0 1rem;
  }
  
  .request-item {
    padding: 0.75rem !important;
  }
  
  .request-item .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }
  
  .request-item .ms-2 {
    margin-left: 0 !important;
    margin-top: 0.5rem;
    align-self: flex-end;
  }
}

/* Стилі для адаптивного героя */
#hero-user-content {
  animation: fadeIn 0.5s ease-in;
}

#hero-guest-content {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Покращені стилі для швидких дій користувача */
#hero-user-content .btn {
  transition: all 0.3s ease;
  min-height: 80px;
}

#hero-user-content .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#hero-user-content .btn i {
  transition: transform 0.2s ease;
}

#hero-user-content .btn:hover i {
  transform: scale(1.1);
}

/* Компактні соціальні кнопки */
#hero-user-content .btn-sm {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Responsive adjustments for user content */
@media (max-width: 576px) {
  #hero-user-content .row.g-3 {
    gap: 0.75rem !important;
  }
  
  #hero-user-content .btn {
    min-height: 60px;
    font-size: 0.875rem;
  }
  
  #hero-user-content .btn i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem !important;
  }
}

/* Стилі для соціальних кнопок у навбарі */
.navbar-social .btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.navbar-social .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255,255,255,0.3);
}

.navbar-social .btn i {
  font-size: 16px;
}

/* Responsive для соціальних кнопок у навбарі */
@media (max-width: 991px) {
  .navbar-social {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    justify-content: center;
  }
  
  .navbar-social .btn {
    margin-right: 0.5rem !important;
  }
}

@media (max-width: 576px) {
  .navbar-social .btn {
    width: 32px;
    height: 32px;
  }
  
  .navbar-social .btn i {
    font-size: 14px;
  }
}
.leaflet-draw { display: none !important; visibility: hidden !important; opacity: 0 !important; }

/* Повне приховування всіх draw контролів Leaflet */
.leaflet-draw { display: none !important; visibility: hidden !important; opacity: 0 !important; }
.leaflet-draw-toolbar { display: none !important; visibility: hidden !important; opacity: 0 !important; }
.leaflet-draw-toolbar a { display: none !important; visibility: hidden !important; opacity: 0 !important; }
.leaflet-draw-edit-toolbar { display: none !important; visibility: hidden !important; opacity: 0 !important; }
.leaflet-draw-edit-toolbar a { display: none !important; visibility: hidden !important; opacity: 0 !important; }
.leaflet-draw-actions { display: none !important; visibility: hidden !important; opacity: 0 !important; }
.leaflet-draw-actions a { display: none !important; visibility: hidden !important; opacity: 0 !important; }
.leaflet-draw-draw-polygon { display: none !important; visibility: hidden !important; opacity: 0 !important; }
.leaflet-draw-edit-edit { display: none !important; visibility: hidden !important; opacity: 0 !important; }


/* Приховування всіх стандартних draw контролів */
.leaflet-draw-toolbar a,
.leaflet-draw-actions a,
.leaflet-draw-actions li,
.leaflet-draw-toolbar,
.leaflet-draw-actions,
.leaflet-draw-draw-polygon,
.leaflet-draw-edit-edit,
.leaflet-draw-edit-remove {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Приховування контейнера draw панелі */
.leaflet-control-draw {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
.leaflet-draw-toolbar, .leaflet-draw-edit-toolbar, .leaflet-draw-draw-polygon, .leaflet-draw-edit-edit { display: none !important; visibility: hidden !important; opacity: 0 !important; }
.leaflet-control-draw, .leaflet-draw-section, .leaflet-draw-actions { display: none !important; visibility: hidden !important; opacity: 0 !important; }

/* ВАЖЛИВО: Дозволяємо відображення tooltip'ів з площею */
.leaflet-draw-tooltip {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Красиві стилі вершин полігону для всіх пристроїв (як на мобільному) */
.leaflet-editing-icon {
  width: 20px !important;
  height: 20px !important;
  margin-left: -10px !important;
  margin-top: -10px !important;
  border-radius: 50% !important;
  border: 3px solid #198754 !important;
  background-color: white !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* Tooltip для показу площі під час редагування (Desktop) */
.area-tooltip-editing {
  background: rgba(25, 135, 84, 0.9) !important;
  color: white !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
  border: none !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 1000 !important;
}

.area-tooltip-editing::before {
  border-color: rgba(25, 135, 84, 0.9) transparent transparent transparent !important;
}

/* Спеціальні стилі для мобільних tooltip'ів з площею */
@media (max-width: 768px), (pointer: coarse) {
  .leaflet-draw-tooltip {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
    padding: 8px 12px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    border-radius: 6px !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    z-index: 1000 !important;
    pointer-events: none !important;
  }
  
  .leaflet-draw-tooltip-subtext {
    display: block !important;
    font-size: 13px !important;
    opacity: 0.95 !important;
    margin-top: 3px !important;
    color: #f8f9fa !important;
    font-weight: 500 !important;
  }
}

/* Мобільні оптимізації для головної сторінки */
@media (max-width: 767.98px) {
  /* Загальні оптимізації */
  .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  /* Hero секція */
  .hero-section {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }
  
  .hero-section h1 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  .hero-section .lead {
    font-size: 1rem !important;
    margin-bottom: 1rem !important;
  }
  
  /* Dashboard оптимізації */
  #user-dashboard-grid {
    margin-top: 0.75rem !important;
  }
  
  #user-dashboard-grid .card {
    margin-bottom: 0.75rem !important;
  }
  
  #user-dashboard-grid .card-body {
    padding: 0.75rem !important;
  }
  
  #user-dashboard-grid h5 {
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
  }
  
  /* Секція підприємств */
  #user-companies-container {
    margin-top: 0.5rem !important;
  }
  
  /* Кнопки */
  .btn-sm {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.8rem !important;
  }
  
  /* Мінімізуємо відступи */
  .mb-3 {
    margin-bottom: 0.75rem !important;
  }
  
  .mb-2 {
    margin-bottom: 0.5rem !important;
  }
  
  .mt-2 {
    margin-top: 0.5rem !important;
  }
  
  .py-3 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }
}

/* Стилі для картки заміток на дашборді */
.notes-summary-card {
  background: linear-gradient(135deg, #fff8dc 0%, #fff 100%);
  border: 1px solid #ffc107;
  border-left: 4px solid #ffc107;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.notes-summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #ffc107, #fd7e14, #ffc107);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.notes-summary-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 193, 7, 0.2);
  border-color: #fd7e14;
  border-left-color: #fd7e14;
}

.notes-summary-card:hover::before {
  opacity: 1;
}

.notes-summary-card:hover .bi-arrow-right {
  transform: translateX(3px);
  color: #fd7e14 !important;
}

.notes-icon-wrapper {
  position: relative;
}

.notes-icon-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255, 193, 7, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: -1;
}

.notes-summary-card:hover .notes-icon-wrapper::after {
  background: radial-gradient(circle, rgba(253, 126, 20, 0.15) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(1.1);
}

.notes-stat-item {
  transition: transform 0.2s ease;
}

.notes-summary-card:hover .notes-stat-item {
  transform: scale(1.05);
}

.notes-stat-number {
  font-weight: 700;
  color: #495057;
}

.notes-stat-label {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Мобільні оптимізації для картки заміток */
@media (max-width: 768px) {
  .notes-summary-card .card-body {
    padding: 1rem !important;
  }
  
  .notes-icon-wrapper .display-6 {
    font-size: 2rem !important;
  }
  
  .notes-summary-card .card-title {
    font-size: 1.1rem;
  }
  
  .notes-summary-card .text-muted {
    font-size: 0.85rem !important;
  }
  
  .notes-stat-number {
    font-size: 0.85rem !important;
  }
  
  .notes-stat-label {
    font-size: 0.65rem !important;
  }
}

@media (max-width: 480px) {
  .notes-summary-card .card-body {
    padding: 0.75rem !important;
  }
  
  .notes-icon-wrapper {
    margin-right: 0.75rem !important;
  }
  
  .notes-icon-wrapper .display-6 {
    font-size: 1.75rem !important;
  }
  
  .notes-summary-card .card-title {
    font-size: 1rem;
  }
  
  .notes-summary-card .card-title .bi-arrow-right {
    font-size: 0.85rem !important;
  }
}
