@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  color: #333;
}

body {
    background: #00c6ff;  
    background: -webkit-linear-gradient(to right, #0072ff, #00c6ff);  
    background: linear-gradient(to right, #0072ff, #00c6ff); 
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.head h2 {
    font-size: 1.7rem;
    font-weight: bolder;
    color: #fff;
    background: linear-gradient(
      to right,
      #e81416, #ff4500, #ffa500, #ffd700, 
      #70369d, #487de7, #4b369d, #70369d,
      #e81416
    );
    background-size: 400% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: organic-rainbow 8s ease-in-out infinite;
  }
  
  @keyframes organic-rainbow {
    0% {
      background-position: 0% 50%;
      animation-timing-function: ease-in;
    }
    20% {
      background-position: 25% 50%;
      animation-timing-function: ease-out;
    }
    40% {
      background-position: 50% 50%;
      animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0.25);
    }
    60% {
      background-position: 75% 50%;
      animation-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
    }
    80% {
      background-position: 100% 50%;
      animation-timing-function: ease-in;
    }
    100% {
      background-position: 0% 50%;
      animation-timing-function: ease-out;
    }
  }

.head p {
    font-size: 1rem;
    margin-bottom: 30px;
    color: #fff;
}

.date-input {
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #eee;
}

.datepicker-container {
    position: relative;
}

.datepicker {
    position: absolute;
    top: 100%;
    z-index: 100;
    margin-top: 2px;
    background: #fff;
    padding: 10px;
    border-radius: 5px;
}

.datepicker button {
    cursor: pointer;
    border: none;
    border-radius: 3px;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    transition: 0.3s;
}

.days, .dates {
    display: grid;
    grid-template-columns: repeat(7, 32px);
    gap: 10px;
    margin-block: 10px;
}

.days span {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.dates button {
    color: slategray;
    aspect-ratio: 1;
}

.dates button:disabled {
    opacity: 0.5;
    pointer-events: none;
    user-select: none;

}

.dates button:hover {
    background: rgb(119, 136, 153, 0.1);
}

.dates button.today {
    background: rgb(0, 198, 255, 0.2);
    color: #0072ff;
}

.dates button.selected {
    background: #0072ff;
    color: #fff;
}

.datepicker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.datepicker-header select, .datepicker-header input {
    font-size: 14px;
    border: 1px solid #eee;
}

.datepicker-header input {
    max-width: 64px;
}

.datepicker-header button {
    color: slategray;
}

.datepicker-header button:hover {
    color: #0072ff;
}

.datepicker-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.datepicker-footer button {
    background: rgb(119, 136, 153, 0.1);
    padding: 3px 10px;
    transition: 0.3s;
}

.datepicker-footer button.apply {
    background: #0072ff;
    color: #fff;
}

.datepicker-footer button.apply:hover {
    background: #003575;
    transform: translateY(-0.5px);
}

.datepicker-footer button.cancel:hover {
    color: #e03023;
    background: rgb(112, 128, 144, 0.3);
    transform: translateY(-0.5px);
}

@media (max-width: 768px) {
    .datepicker {
        width: 100%;
        left: 0;
        right: 0;
    }
    
    .days, .dates {
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
    }
    
    .datepicker-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .datepicker-header div {
        order: -1;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .datepicker-container {
        padding: 15px;
    }
    
    .date-input {
        width: 100%;
    }
}