/**
 * Public styles
 *
 * @package Events_Manager_MIT
 */

/* General */
.emmit-event-meta {
  margin-bottom: 20px;
}

.emmit-event-meta > div {
  margin-bottom: 5px;
}

.emmit-event-meta .dashicons {
  margin-right: 5px;
  color: #555;
}

.emmit-featured-badge {
  background-color: #e44d26;
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

/* Grid View */
.emmit-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.emmit-event-grid-item {
  border: 1px solid #ddd;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.emmit-event-grid-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.emmit-event-grid-item .emmit-event-image {
  height: 200px;
  overflow: hidden;
}

.emmit-event-grid-item .emmit-event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.emmit-event-grid-item .emmit-event-details {
  padding: 20px;
}

.emmit-event-grid-item .emmit-event-title {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 18px;
}

.emmit-event-grid-item .emmit-event-excerpt {
  margin-bottom: 15px;
  font-size: 14px;
}

.emmit-event-grid-item .emmit-event-link {
  display: inline-block;
  padding: 8px 15px;
  background-color: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.emmit-event-grid-item .emmit-event-link:hover {
  background-color: #005177;
}

/* List View */
.emmit-events-list {
  margin-bottom: 30px;
}

.emmit-event-list-item {
  display: flex;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.emmit-event-list-item .emmit-event-date-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 80px;
  background-color: #0073aa;
  color: #fff;
  padding: 10px;
  text-align: center;
}

.emmit-event-list-item .emmit-event-month {
  font-size: 14px;
  text-transform: uppercase;
}

.emmit-event-list-item .emmit-event-day {
  font-size: 24px;
  font-weight: bold;
}

.emmit-event-list-item .emmit-event-details {
  flex: 1;
  padding: 20px;
}

.emmit-event-list-item .emmit-event-image {
  width: 150px;
  overflow: hidden;
}

.emmit-event-list-item .emmit-event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Single Event */
.emmit-single-event {
  margin-bottom: 40px;
}

.emmit-event-header {
  margin-bottom: 30px;
}

.emmit-event-title {
  margin-bottom: 15px;
}

.emmit-event-image {
  margin-bottom: 30px;
}

.emmit-event-image img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.emmit-event-content {
  margin-bottom: 30px;
}

.emmit-event-venue,
.emmit-event-organizer {
  margin-bottom: 30px;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 5px;
}

.emmit-event-registration {
  margin-top: 30px;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 5px;
}

.emmit-registration-form {
  margin-top: 20px;
}

.emmit-form-field {
  margin-bottom: 15px;
}

.emmit-form-field label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.emmit-form-field input,
.emmit-form-field textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
}

.emmit-form-submit {
  margin-top: 20px;
}

.emmit-form-submit button {
  padding: 10px 20px;
  background-color: #0073aa;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.emmit-form-submit button:hover {
  background-color: #005177;
}

.emmit-form-message {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 3px;
}

.emmit-form-message.emmit-success {
  background-color: #dff0d8;
  color: #3c763d;
  border: 1px solid #d6e9c6;
}

.emmit-form-message.emmit-error {
  background-color: #f2dede;
  color: #a94442;
  border: 1px solid #ebccd1;
}

/* Calendar */
.emmit-calendar {
  margin-bottom: 30px;
}

.emmit-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.emmit-calendar-nav {
  text-decoration: none;
}

.emmit-calendar-table {
  width: 100%;
  border-collapse: collapse;
}

.emmit-calendar-table th,
.emmit-calendar-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
  vertical-align: top;
}

.emmit-calendar-table th {
  background-color: #f9f9f9;
  font-weight: bold;
}

.emmit-calendar-day {
  height: 100px;
  position: relative;
}

.emmit-empty-day {
  background-color: #f9f9f9;
}

.emmit-current-day {
  background-color: #f0f8ff;
}

.emmit-day-number {
  position: absolute;
  top: 5px;
  right: 5px;
  font-weight: bold;
}

.emmit-day-events {
  margin-top: 25px;
}

.emmit-calendar-event {
  margin-bottom: 5px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emmit-calendar-event a {
  display: block;
  padding: 3px 5px;
  background-color: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 3px;
}

.emmit-calendar-event.emmit-featured-event a {
  background-color: #e44d26;
}

.emmit-event-time {
  font-weight: bold;
  margin-right: 5px;
}

.emmit-event-tooltip {
  position: absolute;
  z-index: 1000;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  max-width: 300px;
}

.emmit-tooltip-title {
  font-weight: bold;
  margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 768px) {
  .emmit-events-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .emmit-event-list-item {
    flex-direction: column;
  }

  .emmit-event-list-item .emmit-event-date-block {
    width: 100%;
    flex-direction: row;
    padding: 5px;
  }

  .emmit-event-list-item .emmit-event-month,
  .emmit-event-list-item .emmit-event-day {
    margin: 0 5px;
  }

  .emmit-event-list-item .emmit-event-image {
    width: 100%;
    height: 200px;
    order: -1;
  }

  .emmit-calendar-table th,
  .emmit-calendar-table td {
    padding: 5px;
  }

  .emmit-calendar-day {
    height: 80px;
  }
}
