/* DITASCOM Calendar Styles - Pure CSS */


/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}


html, body {
  background-color: #f9fafb;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 100vh;
}


/* Header styles */
.header {
  background-color: #312e81;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  color: white;
}


.logo {
  font-size: 20px;
  display: flex;
  align-items: center;
}


.logo-inner {
  width: 40px;
  height: 40px;
  margin-right: 0.625rem;
}


.login-card {
  width: 4.5rem;
  height: 2.5rem;
  background-color: #3730a3;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}


.login-card:hover {
  background-color: #4338ca;
}


.login {
  font-size: 1rem;
  cursor: pointer;
  color: white;
  text-decoration: none;
}


/* Parish selection styles */
.select-parish {
  padding: 2rem;
  padding-bottom: 0;
}


.select-parish label {
  display: block;
  color: #4b5563;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}


.select-container {
  position: relative;
  width: 20rem;
}


.select-input {
  width: 100%;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 0;
  padding: 0 1rem;
  font-size: 1rem;
  color: black;
  background-color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}


/* Calendar styles */
.calendar-card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin: 3.75rem;
  max-width: 100%;
  overflow-x: hidden;
}


.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
  color: black;
  padding: 0.5rem 0;
}



.nav-button {
  background-color: #312e81;
  color: white;
  border: 0;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}


.nav-button:hover {
  background-color: #3730a3;
}


.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}


.day-header {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0.625rem;
  font-size: 1rem;
  color: #4b5563;
  font-weight: 600;
}


.day {
  background-color: white;
  border-radius: 0.25rem;
  border: 1px solid #e5e7eb;
  height: 4rem;
  padding: 0.625rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 0.3s;
}


.day:hover {
  background-color: #f9fafb;
}


.day.empty {
  background-color: #f9fafb;
  cursor: default;
}


.day-number {
  font-size: 0.875rem;
  color: #374151;
}


.day.today .day-number {
  color: #2563eb;
  font-weight: 600;
}


.day.has-events {
  border-left: 4px solid #312e81;
}


/* Event indicators */
.event-indicator {
  font-size: 0.75rem;
  color: #312e81;
  background-color: #a19ee0;
  border-radius: 0.25rem;
  padding: 0.125rem 0.25rem;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}


/* Footer styles */
.footer {
  background-color: #f3f4f6;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  font-size: 0.75rem;
}


/* Chatbot styles */
.chat-widget {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 50;
}


.chat-button {
  width: 3.75rem;
  height: 3.75rem;
  background-color: #312e81;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s;
}


.chat-button:hover {
  transform: scale(1.05);
}


.chat-button i {
  color: white;
  font-size: 1.5rem;
}


.chat-container {
  position: fixed;
  bottom: 6rem;
  right: 1.25rem;
  width: 22rem;
  height: 31.25rem;
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: none;
  flex-direction: column;
  overflow: hidden;
}


.chat-header {
  background-color: #312e81;
  color: white;
  padding: 1rem;
  font-size: 1.125rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


.close-chat {
  cursor: pointer;
  font-size: 1.25rem;
}


.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}


.message {
  margin-bottom: 1rem;
  max-width: 80%;
}


.message.user {
  margin-left: auto;
}


.message-content {
  padding: 0.625rem 1rem;
  border-radius: 1rem;
  display: inline-block;
}


.message.bot .message-content {
  background-color: #f3f4f6;
  color: #374151;
}


.message.user .message-content {
  background-color: #312e81;
  color: white;
}


.chat-input {
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 0.625rem;
}


.chat-input input {
  flex: 1;
  padding: 0.625rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}


.chat-input button {
  background-color: #312e81;
  color: white;
  border: 0;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s;
}


.chat-input button:hover {
  background-color: #3730a3;
}


/* Responsive design */
@media (max-width: 768px) {
  /* Prevent horizontal scrolling but allow vertical */
  html, body {
    overflow-x: hidden;
    width: 100vw;
    max-width: 100vw;
    height: auto;
    min-height: 100vh;
  }
  
  * {
    max-width: 100%;
  }
  
  /* Header adjustments */
  .header {
    padding: 0 1rem;
    height: 50px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .logo {
    font-size: 1rem;
  }
  
  .logo-inner {
    width: 2rem;
    height: 2rem;
    margin-right: 0.5rem;
  }
  
  .login-card {
    width: 4rem;
    height: 2rem;
    font-size: 0.875rem;
  }
  
  /* Parish selection adjustments */
  .select-parish {
    padding: 1rem;
    padding-bottom: 0;
    width: 100%;
    box-sizing: border-box;
  }
  
  .select-container {
    width: 100%;
  }
  
  .select-input {
    height: 2.25rem;
    font-size: 0.875rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Calendar adjustments */
  .calendar-card {
    margin: 1rem;
    padding: 1rem;
    width: calc(100% - 2rem);
    box-sizing: border-box;
  }
  
  .calendar-header {
    flex-direction: row;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .nav-button {
    background: transparent;
    color: #312e81;
    border: none;
    padding: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
  }
  
  .nav-button:hover {
    color: #312e81;
    background: transparent;
  }
  
  .nav-button span {
    display: inline;
  }
  
  /* Calendar grid mobile optimization */
  .calendar-grid {
    gap: 0.125rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  
  .day-header {
    padding: 0.375rem;
    font-size: 0.75rem;
  }
  
  .day {
    background-color: transparent;
    border: none;
    height: 3rem;
    padding: 0.25rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
  }
  
  .day:hover {
    background-color: #f3f4f6;
  }
  
  .day.empty {
    background-color: transparent;
    cursor: default;
  }
  
  .day.empty:hover {
    background-color: transparent;
  }
  
  .day-number {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 400;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
  }
  
  .day.today .day-number {
    background-color: #312e81;
    color: white;
    font-weight: 600;
  }
  
  .day.has-events {
    border: none;
  }
  
  .day.has-events .day-number::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.25rem;
    height: 0.25rem;
    background-color: #312e81;
    border-radius: 50%;
  }
  
  .day.today.has-events .day-number::after {
    background-color: white;
  }
  
  .event-indicator {
    display: none;
  }
  
  /* Footer adjustments */
  .footer {
    padding: 1rem;
    padding-bottom: 5rem;
    font-size: 0.625rem;
  }
  
  /* Chatbot mobile optimization */
  .chat-widget {
    bottom: 1.5rem;
    right: 1rem;
  }
  
  .chat-button {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .chat-button i {
    font-size: 1rem;
  }
  
  .chat-container {
    width: calc(100vw - 2rem);
    height: 50vh;
    bottom: 4.25rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
  
  .chat-header {
    padding: 0.75rem;
    font-size: 1rem;
  }
  
  .chat-messages {
    padding: 0.75rem;
  }
  
  .message-content {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .chat-input {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .chat-input input {
    padding: 0.5rem;
    font-size: 0.875rem;
  }
  
  .chat-input button {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}


/* Extra small devices (phones in portrait) */
@media (max-width: 480px) {
  .header {
    height: 45px;
    padding: 0 0.75rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .logo {
    font-size: 0.875rem;
  }
  
  .logo-inner {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .select-parish {
    padding: 0.75rem;
    padding-bottom: 0;
  }
  
  .calendar-card {
    margin: 0.75rem;
    padding: 0.75rem;
    width: calc(100% - 1.5rem);
    box-sizing: border-box;
  }
  
  .calendar-header {
    gap: 0.5rem;
  }
  
  .nav-button {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .day {
    height: 2.5rem;
    padding: 0.125rem;
  }
  
  .day-header {
    padding: 0.25rem;
    font-size: 0.625rem;
  }
  
  .day-number {
    font-size: 0.75rem;
    width: 2rem;
    height: 2rem;
  }
  
  .event-indicator {
    display: none;
  }
  
  .chat-widget {
    bottom: 1rem;
    right: 1rem;
  }
  
  .chat-button {
    width: 2.25rem;
    height: 2.25rem;
  }
  
  .chat-button i {
    font-size: 0.875rem;
  }
  
  .chat-container {
    width: calc(100vw - 1.5rem);
    height: 45vh;
    bottom: 3.5rem;
    right: 0.75rem;
    left: 0.75rem;
  }
}
