/* ================================
   MODALS - Event Modal & New Chat Modal
   Vollständige Modal-Komponenten für Events und Chat
   ================================ */

/* === EVENT MODAL === */
.event-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.event-modal.active {
  opacity: 1;
  visibility: visible;
}

.event-modal-content {
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.event-modal.active .event-modal-content {
  transform: translateY(0);
}

.event-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--primary-gradient);
  color: white;
}

.event-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.event-modal-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.event-modal-close:hover {
  transform: scale(1.2);
}

.event-modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(80vh - 60px);
}

/* Event List Grid */
.event-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* Event Card */
.absolute-event-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  cursor: pointer;
  background: white;
}

.absolute-event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Event Image */
.absolute-event-image {
  height: 160px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.absolute-event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.absolute-event-card:hover .absolute-event-image img {
  transform: scale(1.1);
}

/* Event Info */
.absolute-event-info {
  padding: 15px;
  background: white;
}

.absolute-event-name {
  font-weight: 600;
  margin-bottom: 5px;
  color: #333;
  font-size: 1rem;
}

.absolute-event-artist {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.absolute-event-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.85rem;
  color: #555;
}

.absolute-event-details i {
  width: 20px;
  margin-right: 5px;
  color: var(--primary-blue);
}

/* Selected Event */
.absolute-event-card.selected {
  border: 3px solid var(--primary-blue);
  box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.absolute-event-card.selected::after {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background: var(--primary-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
}

/* Event Modal Footer */
.event-modal-footer {
  background-color: #f8f9fa;
  padding: 20px;
  display: flex;
  justify-content: center;
  border-top: 1px solid #ddd;
}

.event-send-btn {
  padding: 12px 25px;
  min-width: 240px;
  font-size: 1.1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #1E88E5 0%, #00BCD4 100%);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
  transition: all 0.3s ease;
}

.event-send-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}

.event-send-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 123, 255, 0.3);
}

/* === NEW CHAT MODAL === */
.new-chat-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.new-chat-modal.active {
  opacity: 1;
  visibility: visible;
}

.new-chat-content {
  width: 90%;
  max-width: 500px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.new-chat-modal.active .new-chat-content {
  transform: translateY(0);
}

.new-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--primary-gradient);
  color: white;
}

.new-chat-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.close-new-chat-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-new-chat-btn:hover {
  transform: scale(1.2);
}

.new-chat-search {
  padding: 15px;
}

.new-chat-search input {
  width: 100%;
  padding: 10px 15px;
  border-radius: 30px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.new-chat-search input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.new-chat-results {
  max-height: 350px;
  overflow-y: auto;
  padding: 0 15px 15px;
}

.new-chat-user {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.new-chat-user:hover {
  background: #f0f2f5;
}

.new-chat-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  object-fit: cover;
}

.new-chat-user-info {
  flex: 1;
  min-width: 0;
}

.new-chat-user-name {
  font-weight: 500;
  margin-bottom: 2px;
}

.new-chat-user-bio {
  font-size: 12px;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
  .event-modal-content {
    width: 95%;
    max-height: 85vh;
  }
  
  .event-list {
    grid-template-columns: 1fr;
  }
  
  .new-chat-content {
    width: 95%;
  }
}

@media (max-width: 480px) {
  .event-modal-content {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
  
  .event-modal-header,
  .new-chat-header {
    border-radius: 0;
  }
  
  .event-modal-body {
    max-height: calc(100vh - 140px);
  }
  
  .new-chat-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
}

/* === DARK MODE === */
body.dark-mode .event-modal {
  background-color: rgba(0, 0, 0, 0.85);
}

body.dark-mode .event-modal-content {
  background: #1e293b;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

body.dark-mode .event-modal-header {
  background: linear-gradient(135deg, #1E88E5, #00BCD4);
}

body.dark-mode .event-modal-body {
  background: #0f172a;
}

body.dark-mode .absolute-event-card {
  background: #1e293b;
  border: 1px solid #334155;
}

body.dark-mode .absolute-event-card:hover {
  border-color: #475569;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

body.dark-mode .absolute-event-info {
  background: #1e293b;
}

body.dark-mode .absolute-event-name {
  color: #e2e8f0;
}

body.dark-mode .absolute-event-artist {
  color: #94a3b8;
}

body.dark-mode .absolute-event-details {
  color: #cbd5e1;
}

body.dark-mode .absolute-event-card.selected {
  border-color: #1E88E5;
  box-shadow: 0 0 15px rgba(30, 136, 229, 0.5);
}

body.dark-mode .event-modal-footer {
  background: #1e293b;
  border-top-color: #334155;
}

body.dark-mode .event-send-btn {
  background: linear-gradient(135deg, #1E88E5, #00BCD4);
}

body.dark-mode .event-send-btn:hover:not(:disabled) {
  box-shadow: 0 6px 15px rgba(30, 136, 229, 0.4);
}

body.dark-mode .new-chat-modal {
  background-color: rgba(0, 0, 0, 0.8);
}

body.dark-mode .new-chat-content {
  background: #1e293b;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

body.dark-mode .new-chat-header {
  background: linear-gradient(135deg, #1E88E5, #00BCD4);
}

body.dark-mode .new-chat-search input {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

body.dark-mode .new-chat-search input:focus {
  background: #475569;
  border-color: #1E88E5;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.3);
}

body.dark-mode .new-chat-search input::placeholder {
  color: #94a3b8;
}

body.dark-mode .new-chat-results {
  background: #1e293b;
}

body.dark-mode .new-chat-user {
  color: #e2e8f0;
}

body.dark-mode .new-chat-user:hover {
  background: #334155;
}

body.dark-mode .new-chat-user-name {
  color: #e2e8f0;
}

body.dark-mode .new-chat-user-bio {
  color: #94a3b8;
}
