/* Animation keyframes */
@keyframes float-diagonal-1 {
    0% { transform: translate(-100px, 100vh) rotate(0deg); }
    50% { transform: translate(50vw, 50vh) rotate(180deg) scale(1.2); }
    100% { transform: translate(calc(100vw + 100px), -100px) rotate(360deg); }
}

@keyframes float-diagonal-2 {
    0% { transform: translate(100vw, -100px) rotate(0deg); }
    50% { transform: translate(30vw, 60vh) rotate(-180deg) scale(1.1); }
    100% { transform: translate(-100px, calc(100vh + 100px)) rotate(-360deg); }
}

@keyframes float-diagonal-3 {
    0% { transform: translate(-100px, -100px) rotate(0deg); }
    50% { transform: translate(60vw, 40vh) rotate(180deg) scale(1.2); }
    100% { transform: translate(calc(100vw + 100px), calc(100vh + 100px)) rotate(360deg); }
}

@keyframes float-vertical {
    0% { transform: translate(20vw, -100px) rotate(0deg); }
    50% { transform: translate(20vw, 50vh) rotate(180deg) scale(1.3); }
    100% { transform: translate(20vw, calc(100vh + 100px)) rotate(360deg); }
}

@keyframes float-horizontal {
    0% { transform: translate(-100px, 30vh) rotate(0deg); }
    50% { transform: translate(50vw, 30vh) rotate(180deg) scale(1.2); }
    100% { transform: translate(calc(100vw + 100px), 30vh) rotate(360deg); }
}

@keyframes float-zigzag {
    0% { transform: translate(-100px, 20vh) rotate(0deg); }
    25% { transform: translate(25vw, 60vh) rotate(90deg) scale(1.1); }
    50% { transform: translate(50vw, 20vh) rotate(180deg) scale(1.2); }
    75% { transform: translate(75vw, 70vh) rotate(270deg) scale(1.1); }
    100% { transform: translate(calc(100vw + 100px), 30vh) rotate(360deg); }
}

/* Emoji animations */
.emoji-float {
    position: fixed;
    font-size: 4rem;
    opacity: 0.15;
    animation-timing-function: linear;
    transition: all 0.5s ease;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
    will-change: transform;
}

.emoji-float:hover {
    opacity: 0.25;
    transform: scale(1.2) rotate(15deg);
}

/* Multiple emoji waves for constant appearance across the entire page */
.emoji-1 { animation: float-diagonal-1 15s infinite; }
.emoji-2 { animation: float-diagonal-2 18s infinite; }
.emoji-3 { animation: float-diagonal-3 20s infinite; }
.emoji-4 { animation: float-vertical 22s infinite; }
.emoji-5 { animation: float-horizontal 25s infinite; }
.emoji-6 { animation: float-zigzag 17s infinite; }
.emoji-7 { animation: float-diagonal-1 19s infinite -10s; }
.emoji-8 { animation: float-vertical 21s infinite -12s; }
.emoji-9 { animation: float-zigzag 16s infinite -7s; }
.emoji-10 { animation: float-horizontal 24s infinite -15s; }
.emoji-11 { animation: float-diagonal-2 20s infinite -4s; }
.emoji-12 { animation: float-diagonal-3 23s infinite -9s; }

/* UI Effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

.ticket-shadow {
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.ticket-preview:hover {
    transform: scale(1.02) rotate(0.5deg);
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.4));
    transition: all 0.3s ease;
}

/* Form elements */
input:focus, textarea:focus, select:focus {
    transform: scale(1.02);
    transition: all 0.2s ease;
}

/* Safari-specific fixes for date, time inputs and select fields */
input[type="date"],
input[type="time"],
input#date,
select {
    -webkit-appearance: none;
    appearance: none;
    min-height: 3rem;
    box-sizing: border-box;
    width: 100% !important;
    background-position: calc(100% - 12px) center;
    background-repeat: no-repeat;
    padding-right: 35px;
}

input[type="date"],
input#date {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255, 255, 255, 0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
}

input[type="time"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255, 255, 255, 0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255, 255, 255, 0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Fix for Safari placeholder text in date fields */
input#date::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

/* Hide default datepicker calendar icon in webkit browsers */
input::-webkit-calendar-picker-indicator,
select::-ms-expand {
    opacity: 0;
    width: 35px;
    height: 35px;
    cursor: pointer;
}

/* Make sure select options have proper styling */
select option {
    background-color: #f472b6;
    color: white;
}

.generate-btn {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
}

/* Color picker styles */
.color-option {
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

/* Flatpickr custom styles */
.flatpickr-calendar {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(236, 72, 153, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.flatpickr-day.selected {
    background: #ec4899;
    border-color: #ec4899;
}

.flatpickr-day:hover {
    background: rgba(236, 72, 153, 0.2) !important;
}

.flatpickr-month {
    height: 95px !important;
}

.flatpickr-next-month, .flatpickr-prev-month {
    margin-top: 0.8rem !important;
}

/* Ticket sticker effect */
.ticket-sticker {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 4px;
}

.ticket-sticker::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--ticket-gradient, linear-gradient(45deg, #ec4899, #f43f5e, #ec4899));
    border-radius: 22px;
    z-index: -1;
    opacity: 0.8;
}
