/* Основные стили для календаря событий */
.aed-container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  overflow: hidden;
}
.aed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eaeaea;
  flex-wrap: wrap;
  gap: 15px;
}
.aed-month {
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
  flex: 1;
  min-width: 200px;
}
.aed-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.aed-btn {
  background: #3498db;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
  white-space: nowrap;
  min-height: 44px;
  min-width: 44px;
}
.aed-btn:hover {
  background: #2980b9;
}
.aed-btn:active {
  transform: translateY(1px);
}
.aed-share-btn {
  background: #27ae60;
}
.aed-share-btn:hover {
  background: #219653;
}
.aed-copy-btn {
  background: #95a5a6;
  margin-left: 10px;
}
.aed-copy-btn:hover {
  background: #7f8c8d;
}
.aed-share-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eaeaea;
}
.aed-share-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.aed-share-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #495057;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 14px;
}
.aed-share-link:hover {
  background: #e9ecef;
  color: #212529;
}
.aed-share-url {
  display: flex;
  margin-top: 10px;
}
.aed-share-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-right: none;
  border-radius: 6px 0 0 6px;
  font-size: 14px;
  background: #f8f9fa;
}
.aed-share-input:focus {
  outline: none;
  border-color: #3498db;
}
.aed-event-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
}
.aed-event-image-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 14px;
}
.aed-desktop-view {
  width: 100%;
}
.aed-table {
  width: 100%;
  border-collapse: collapse;
}
.aed-table th {
  background: #f8f9fa;
  padding: 12px 8px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  color: #495057;
  border: 1px solid #dee2e6;
}
.aed-table td {
  border: 1px solid #dee2e6;
  padding: 10px 8px;
  vertical-align: top;
  height: 120px;
  width: 14.28%;
}
.aed-mobile-view {
  display: none;
}
.aed-mobile-day {
  border: 1px solid #eaeaea;
  border-radius: 10px;
  margin-bottom: 15px;
  padding: 0;
  background: white;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.aed-mobile-date {
  background: #f8f9fa;
  padding: 15px;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 1px solid #eaeaea;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.aed-mobile-weekday {
  font-size: 14px;
  color: #6c757d;
  font-weight: normal;
}
.aed-mobile-events {
  padding: 15px;
}
.aed-day {
  font-weight: 600;
  margin-bottom: 8px;
  color: #212529;
  font-size: 16px;
}
.aed-other {
  background-color: #f8f9fa;
}
.aed-other .aed-day {
  color: #adb5bd;
}
.aed-today {
  background-color: #e8f4fc;
}
.aed-today .aed-day {
  color: #3498db;
  font-weight: 700;
}
.aed-event {
  background: #e3f2fd;
  padding: 12px 15px;
  margin: 10px 0;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  border-left: 4px solid #3498db;
  transition: all 0.2s;
  display: block;
  width: 100%;
  text-align: left;
  border: none;
}
.aed-event:hover {
  background: #bbdefb;
}
.aed-title {
  display: block;
  color: #212529;
  font-weight: 500;
  margin-bottom: 4px;
  font-size: 15px;
}
.aed-time {
  font-size: 13px;
  color: #6c757d;
  display: block;
}
.aed-loading {
  text-align: center;
  padding: 60px;
  color: #6c757d;
  font-size: 16px;
}
.aed-loading:after {
  content: '...';
  animation: aed-dots 1.5s infinite;
}
@keyframes aed-dots {
  0%, 20% {
    content: '';
  }
  40% {
    content: '.';
  }
  60% {
    content: '..';
  }
  80%, 100% {
    content: '...';
  }
}
.aed-error {
  text-align: center;
  padding: 20px;
  color: #dc3545;
  background: #f8d7da;
  border-radius: 8px;
  border: 1px solid #f5c6cb;
  margin: 10px 0;
  line-height: 1.5;
}
.aed-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 20px;
  box-sizing: border-box;
}
.aed-modal.active {
  display: flex;
}
.aed-modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.aed-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eaeaea;
  background: #f8f9fa;
  flex-shrink: 0;
}
.aed-modal-title {
  margin: 0;
  font-size: 20px;
  color: #212529;
  font-weight: 600;
  flex: 1;
  padding-right: 10px;
}
.aed-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #6c757d;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.aed-modal-close:hover {
  color: #212529;
  background: #e9ecef;
}
.aed-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
  min-height: 200px;
  -webkit-overflow-scrolling: touch;
}
.aed-modal-meta {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid #3498db;
  line-height: 1.5;
}
.aed-modal-content-body {
  line-height: 1.6;
  font-size: 16px;
  color: #495057;
  word-wrap: break-word;
  min-height: 100px;
}
.aed-modal-content-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
}
.aed-modal-footer {
  padding: 20px;
  border-top: 1px solid #eaeaea;
  background: #f8f9fa;
  flex-shrink: 0;
  text-align: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.aed-no-events {
  text-align: center;
  padding: 40px;
  color: #6c757d;
  font-style: italic;
}
/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .aed-container {
    padding: 15px;
    border-radius: 10px;
  }
  .aed-header {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
  }
  .aed-month {
    font-size: 20px;
    text-align: center;
    min-width: auto;
  }
  .aed-nav {
    justify-content: center;
  }
  .aed-btn {
    padding: 12px 16px;
    font-size: 15px;
    flex: 1;
    min-width: 120px;
  }
  /* Переключаемся на мобильный вид */
  .aed-desktop-view {
    display: none;
  }
  .aed-mobile-view {
    display: block;
  }
  .aed-modal {
    padding: 15px;
  }
  .aed-modal-content {
    width: 95%;
    max-height: 85vh;
  }
  .aed-modal-header {
    padding: 15px;
  }
  .aed-modal-title {
    font-size: 18px;
  }
  .aed-modal-body {
    padding: 15px;
    min-height: 150px;
  }
  .aed-modal-meta {
    padding: 12px;
    font-size: 14px;
  }
  .aed-modal-footer {
    padding: 15px;
    flex-direction: column;
  }
  .aed-share-links {
    flex-direction: column;
  }
  .aed-share-link {
    justify-content: center;
  }
  .aed-event-image {
    max-height: 200px;
  }
}
@media (max-width: 480px) {
  .aed-container {
    padding: 12px;
    border-radius: 8px;
  }
  .aed-header {
    gap: 12px;
  }
  .aed-month {
    font-size: 18px;
  }
  .aed-btn {
    padding: 10px 12px;
    font-size: 14px;
    min-width: 100px;
  }
  .aed-mobile-day {
    margin-bottom: 12px;
  }
  .aed-mobile-date {
    padding: 12px;
    font-size: 15px;
  }
  .aed-mobile-events {
    padding: 12px;
  }
  .aed-event {
    padding: 10px 12px;
    margin: 8px 0;
    font-size: 13px;
  }
  .aed-title {
    font-size: 14px;
  }
  .aed-time {
    font-size: 12px;
  }
  .aed-modal {
    padding: 10px;
  }
  .aed-modal-content {
    width: 100%;
    max-height: 90vh;
    border-radius: 10px;
  }
  .aed-modal-header,
  .aed-modal-body,
  .aed-modal-footer {
    padding: 12px;
  }
  .aed-modal-title {
    font-size: 16px;
  }
  .aed-modal-body {
    min-height: 120px;
  }
  .aed-modal-meta {
    padding: 10px;
    font-size: 13px;
  }
  .aed-modal-content-body {
    font-size: 14px;
  }
  .aed-event-image {
    max-height: 150px;
  }
}