/* ===========================
   GOOGLE CALENDAR API - ESTILOS AVANZADOS
   =========================== */

/* Panel de autenticación */
.auth-panel {
  background: linear-gradient(145deg, #fff 0%, #f8f9fa 100%);
  border: 2px solid var(--primary-color, #8B4513);
  border-radius: 15px;
  padding: 30px;
  margin: 20px auto;
  max-width: 600px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(139, 69, 19, 0.1);
}

.auth-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, 
    var(--primary-color, #8B4513) 0%, 
    var(--secondary-color, #DAA520) 50%, 
    var(--primary-color, #8B4513) 100%);
  border-radius: 15px 15px 0 0;
}

.auth-section h3 {
  color: var(--primary-color, #8B4513);
  margin-bottom: 15px;
  font-family: var(--font-heading, 'Cinzel', serif);
}

.auth-section p {
  color: var(--text-color, #666);
  margin-bottom: 25px;
}

.auth-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Botones de autenticación */
.btn-auth {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: inherit;
}

.btn-auth.primary {
  background: var(--primary-color, #8B4513);
  color: white;
}

.btn-auth.primary:hover {
  background: var(--secondary-color, #DAA520);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.btn-auth.secondary {
  background: #fff;
  color: var(--primary-color, #8B4513);
  border: 2px solid var(--primary-color, #8B4513);
}

.btn-auth.secondary:hover {
  background: var(--primary-color, #8B4513);
  color: white;
}

.btn-auth i {
  font-size: 1.1rem;
}

/* Modal para eventos */
.event-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.event-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.event-modal-content {
  position: relative;
  background: white;
  border-radius: 15px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 2px solid var(--primary-color, #8B4513);
}

.event-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px;
  border-bottom: 2px solid #f0f0f0;
  background: linear-gradient(135deg, var(--primary-color, #8B4513), var(--secondary-color, #DAA520));
  color: white;
  border-radius: 13px 13px 0 0;
}

.event-modal-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-family: var(--font-heading, 'Cinzel', serif);
}

.event-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.event-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Formulario de eventos */
.event-form {
  padding: 30px;
}

.form-group {
  margin-bottom: 25px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary-color, #8B4513);
  margin-bottom: 8px;
  font-size: 1rem;
}

.form-group label i {
  color: var(--secondary-color, #DAA520);
  width: 16px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color, #8B4513);
  box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group input[type="checkbox"] {
  width: auto;
  margin-right: 10px;
}

/* Acciones del formulario */
.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.btn-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-form.primary {
  background: var(--primary-color, #8B4513);
  color: white;
}

.btn-form.primary:hover {
  background: var(--secondary-color, #DAA520);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.btn-form.secondary {
  background: #f8f9fa;
  color: var(--text-color, #666);
  border: 2px solid #e0e0e0;
}

.btn-form.secondary:hover {
  background: #e9ecef;
  border-color: #ccc;
}

/* Gestor de eventos */
.events-manager {
  background: linear-gradient(145deg, #fff 0%, #f8f9fa 100%);
  border: 2px solid var(--primary-color, #8B4513);
  border-radius: 15px;
  padding: 30px;
  margin: 30px auto;
  max-width: 900px;
}

.events-manager h3 {
  color: var(--primary-color, #8B4513);
  margin-bottom: 25px;
  font-family: var(--font-heading, 'Cinzel', serif);
  text-align: center;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.event-item {
  background: white;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.event-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, 
    var(--primary-color, #8B4513), 
    var(--secondary-color, #DAA520));
}

.event-item:hover {
  border-color: var(--primary-color, #8B4513);
  box-shadow: 0 5px 15px rgba(139, 69, 19, 0.1);
  transform: translateY(-2px);
}

.event-info {
  flex: 1;
  margin-right: 20px;
}

.event-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color, #8B4513);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.event-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}

.event-details span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-color, #666);
  font-size: 0.95rem;
}

.event-details i {
  color: var(--secondary-color, #DAA520);
  width: 14px;
}

.event-description {
  color: var(--text-color, #888);
  font-size: 0.9rem;
  line-height: 1.4;
  font-style: italic;
}

.event-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-event-action {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: inherit;
}

.btn-event-action.edit {
  background: #17a2b8;
  color: white;
}

.btn-event-action.edit:hover {
  background: #138496;
  transform: translateY(-1px);
}

.btn-event-action.delete {
  background: #dc3545;
  color: white;
}

.btn-event-action.delete:hover {
  background: #c82333;
  transform: translateY(-1px);
}

.btn-event-action.share {
  background: #28a745;
  color: white;
}

.btn-event-action.share:hover {
  background: #218838;
  transform: translateY(-1px);
}

.no-events {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-color, #999);
}

.no-events i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: var(--secondary-color, #DAA520);
}

/* Responsividad */
@media (max-width: 768px) {
  .event-modal {
    padding: 10px;
  }
  
  .event-modal-content {
    max-height: 95vh;
  }
  
  .event-modal-header {
    padding: 20px;
  }
  
  .event-form {
    padding: 20px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn-form {
    width: 100%;
    justify-content: center;
  }
  
  .event-item {
    flex-direction: column;
    gap: 15px;
  }
  
  .event-info {
    margin-right: 0;
  }
  
  .event-actions {
    width: 100%;
    justify-content: center;
  }
  
  .btn-event-action {
    flex: 1;
    justify-content: center;
  }
  
  .auth-actions {
    flex-direction: column;
  }
  
  .btn-auth {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .auth-panel,
  .events-manager {
    padding: 20px;
    margin: 15px auto;
  }
  
  .event-modal-header h3 {
    font-size: 1.2rem;
  }
  
  .event-title {
    font-size: 1.1rem;
  }
  
  .event-actions {
    flex-direction: column;
  }
}

/* Animaciones */
.event-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

.event-item:nth-child(2) { animation-delay: 0.1s; }
.event-item:nth-child(3) { animation-delay: 0.2s; }
.event-item:nth-child(4) { animation-delay: 0.3s; }

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

/* ===========================
   PANEL DE DIAGNÓSTICO
   =========================== */
.diagnostic-panel {
  background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid var(--primary-color, #8B4513);
  border-radius: 12px;
  margin: 20px 0;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(139, 69, 19, 0.1);
}

.diagnostic-header {
  background: var(--primary-color, #8B4513);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.diagnostic-header h4 {
  margin: 0;
  font-family: var(--font-heading, 'Cinzel', serif);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-diagnostic {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.btn-diagnostic:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.diagnostic-results {
  padding: 20px;
}

.diagnostic-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
}

.diagnostic-item:last-child {
  border-bottom: none;
}

.diagnostic-label {
  font-weight: 600;
  color: var(--text-color, #333);
}

.diagnostic-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
}

.diagnostic-status.success {
  background: #d4edda;
  color: #155724;
}

.diagnostic-status.error {
  background: #f8d7da;
  color: #721c24;
}

.diagnostic-status.warning {
  background: #fff3cd;
  color: #856404;
}

.diagnostic-status i {
  font-size: 16px;
}

@media (max-width: 768px) {
  .diagnostic-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .diagnostic-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .diagnostic-status {
    align-self: flex-end;
  }
}

/* ===========================
   NOTIFICACIONES
   =========================== */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-left: 4px solid var(--primary-color);
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  max-width: 400px;
  font-family: var(--font-text, 'Montserrat', sans-serif);
  animation: slideInRight 0.3s ease;
}

.notification-success {
  border-left-color: #28a745;
  color: #155724;
}

.notification-success i {
  color: #28a745;
}

.notification-error {
  border-left-color: #dc3545;
  color: #721c24;
}

.notification-error i {
  color: #dc3545;
}

.notification-info {
  border-left-color: #17a2b8;
  color: #0c5460;
}

.notification-info i {
  color: #17a2b8;
}

.notification span {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.notification-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #495057;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Estilos para eventos simples */
.event-simple {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.event-simple:hover {
  background: #e9ecef;
  border-color: var(--primary-color);
}

.event-simple strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 4px;
}

.event-simple small {
  color: #6c757d;
  font-size: 12px;
}
