.gradient-text {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.background-animate {
    background-size: 400%;
    -webkit-animation: AnimateBackground 3s ease infinite;
    -moz-animation: AnimateBackground 3s ease infinite;
    animation: AnimateBackground 3s ease infinite;
}

@keyframes AnimateBackground {
    0%,100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Custom Date Picker Styles */
.custom-datepicker {
    position: relative;
    z-index: 200;
}

.custom-datepicker input {
    padding-right: 2.5rem !important;
}

.custom-datepicker .fa-chevron-down {
    color: #6B7280;
    transition: transform 0.2s ease;
}

.custom-datepicker.active .fa-chevron-down {
    transform: rotate(180deg);
}

/* Form overlay */
.form-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 998;
}

.form-overlay.active {
    display: block;
}

/* Desktop styles */
.datepicker-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 100%;
    max-width: 320px;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 999;
}

.datepicker-panel.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.datepicker-header {
    background: linear-gradient(to right, #2563eb, #3b82f6);
    color: white;
    padding: 0.75rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 1rem 1rem 0 0;
}

.datepicker-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    padding: 0 1rem;
}

.datepicker-header button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.datepicker-header button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.datepicker-header button:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Calendar grid styles */
.calendar-grid {
    background: white;
    border-radius: 0 0 1rem 1rem;
    padding: 0.75rem;
}

.calendar-grid .weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    color: #4B5563;
    margin-bottom: 0.5rem;
}

.calendar-grid .weekdays div {
    font-size: 0.75rem;
    padding: 0.25rem;
}

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

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
    font-size: 0.875rem;
    padding: 0.25rem;
    margin: 0.125rem;
    min-width: 2rem;
    min-height: 2rem;
    font-weight: 500;
}

.calendar-day:hover:not(.disabled) {
    background: #2563eb;
    color: white;
}

.calendar-day.selected {
    background: #2563eb;
    color: white;
    font-weight: 600;
}

.calendar-day.today {
    border: 2px solid #2563eb;
    color: #2563eb;
    font-weight: 600;
}

.calendar-day.disabled {
    color: #D1D5DB;
    background: #F3F4F6;
    cursor: not-allowed;
    opacity: 0.5;
}

/* Mobile styles */
@media (max-width: 640px) {
    .datepicker-panel {
        position: fixed;
        bottom: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        top: auto;
        transform: translateY(100%);
        max-width: none;
        width: auto;
        margin: 0;
        border-radius: 1.5rem 1.5rem 1rem 1rem;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        max-height: 60vh;
        overflow-y: auto;
    }

    .datepicker-panel.active {
        transform: translateY(0);
    }

    .calendar-grid {
        padding: 0.75rem;
        padding-bottom: calc(env(safe-area-inset-bottom, 0.75rem) + 0.75rem);
    }

    .calendar-day {
        font-size: 0.875rem;
        min-width: 2rem;
        min-height: 2rem;
        padding: 0.125rem;
    }
}

/* Ensure proper stacking */
.relative.group.custom-datepicker {
    position: static;
}

/* Form container */
form {
    position: relative;
    border-radius: 2rem;
    overflow: visible;
}

form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.25rem;
    background: linear-gradient(to right, #2563eb, #3b82f6, #2563eb);
    z-index: 1;
}

/* Add styles for autocomplete dropdown */
.autocomplete-items {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 200;
    border: 1px solid rgba(229, 231, 235);
}

.autocomplete-items > div {
    position: relative;
    background: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.autocomplete-items > div > div {
    padding: 1rem;
    background: white;
}

.autocomplete-items > div:hover {
    background-color: #f3f4f6;
}

/* Form elements z-index */
.form-field-container {
    position: relative;
    z-index: 200;
}

.relative.group {
    position: relative;
    z-index: inherit;
}

.relative.group.active {
    z-index: 201;
}

/* Ensure clean rendering */
.form-field-container,
.autocomplete-items,
.autocomplete-items > div {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Submit button container */
.submit-button-container {
    position: relative;
    z-index: 50;
}

/* Ensure clean text rendering */
* {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ensure inputs are crisp */
input[type="text"] {
    background: white !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: 3.5rem !important;
    display: flex !important;
    align-items: center !important;
}

.relative.group input[readonly] {
    cursor: pointer;
} 