/* Contact Page Specific Styles */

/* Date and Time Input Styling for Theme */
input[type="date"],
input[type="time"] {
    color-scheme: light;
}

.dark input[type="date"],
.dark input[type="time"] {
    color-scheme: dark;
    color: #E5E7EB;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0;
    position: absolute;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Dark mode calendar picker */
.dark input[type="date"]::-webkit-calendar-picker-indicator,
.dark input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Ensure icons are visible and positioned correctly */
input[type="date"]:focus + i,
input[type="time"]:focus + i {
    opacity: 0.5;
    z-index: 0;
}

/* Custom Glass Calendar Picker */
.calendar-container {
    position: relative;
}

.calendar-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    display: none;
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calendar-popup.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.dark .calendar-popup {
    background: rgba(30, 30, 35, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}


.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-nav-btn {
    background: rgba(0, 123, 255, 0.1);
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    color: #007BFF;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav-btn:hover {
    background: rgba(0, 123, 255, 0.2);
    transform: scale(1.05);
}

.dark .calendar-nav-btn {
    background: rgba(0, 123, 255, 0.2);
    color: #4c9aff;
}

.calendar-month-year {
    font-weight: 600;
    font-size: 1.1rem;
    color: #111;
    font-family: 'Space Grotesk', sans-serif;
}

.dark .calendar-month-year {
    color: #E5E7EB;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.calendar-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6B7280;
    padding: 0.5rem 0.25rem;
    text-transform: uppercase;
    position: relative;
    min-width: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-weekday .weekday-full {
    display: none;
}

.calendar-weekday .weekday-short {
    display: inline;
}

.dark .calendar-weekday {
    color: #9CA3AF;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    width: 100%;
    overflow: hidden;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #111;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.dark .calendar-day {
    color: #E5E7EB;
}

.calendar-day:hover:not(.other-month):not(:disabled) {
    background: rgba(0, 123, 255, 0.1);
    transform: scale(1.05);
}

.calendar-day.other-month {
    color: #9CA3AF;
    opacity: 0.5;
}

.dark .calendar-day.other-month {
    color: #6B7280;
}

.calendar-day.today {
    background: rgba(0, 123, 255, 0.2);
    color: #007BFF;
    font-weight: 700;
}

.dark .calendar-day.today {
    background: rgba(0, 123, 255, 0.3);
    color: #4c9aff;
}

.calendar-day.selected {
    background: #007BFF;
    color: white;
    font-weight: 700;
}

.calendar-day.selected:hover {
    background: #0069D9;
}

/* Custom Glass Time Picker */
.time-container {
    position: relative;
}

.time-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    display: none;
}

.dark .time-popup {
    background: rgba(30, 30, 35, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.time-popup.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.time-picker-header {
    margin-bottom: 1.5rem;
}

.time-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.time-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.time-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-family: 'Space Grotesk', sans-serif;
}

.dark .time-label {
    color: #9CA3AF;
}

.time-separator {
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    padding-top: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
}

.dark .time-separator {
    color: #E5E7EB;
}

.time-scroll {
    height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
    width: 100%;
    max-width: 80px;
}

#period-scroll {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-scroll::-webkit-scrollbar {
    width: 4px;
}

.time-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.time-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 123, 255, 0.3);
    border-radius: 2px;
}

.time-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 123, 255, 0.5);
}

.time-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 0;
}

#period-options {
    padding: 0;
    gap: 0.5rem;
}

.time-option {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: #111;
    font-size: 1.25rem;
    min-width: 60px;
    text-align: center;
    font-family: 'Space Grotesk', sans-serif;
}

.dark .time-option {
    color: #E5E7EB;
}

.time-option:hover {
    background: rgba(0, 123, 255, 0.1);
    transform: scale(1.1);
}

.time-option.selected {
    background: #007BFF;
    color: white;
    font-weight: 700;
    transform: scale(1.15);
}

.time-option.selected:hover {
    background: #0069D9;
}

.time-picker-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.dark .time-picker-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.time-btn {
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: 'DM Sans', sans-serif;
}

.time-btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #6B7280;
}

.dark .time-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #9CA3AF;
}

.time-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.dark .time-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.time-btn-primary {
    background: #007BFF;
    color: white;
}

.time-btn-primary:hover {
    background: #0069D9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

/* Custom Select Dropdown */
.select-dropdown {
    transform-origin: top;
    transition: all 0.2s ease-out;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .select-dropdown {
    background: rgba(30, 30, 35, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.select-option {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease-out;
}

/* Success Popup Styles */
.success-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.success-popup.active {
    pointer-events: auto;
}

.success-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.success-popup.active .success-popup-overlay {
    opacity: 1;
}

.success-popup-content {
    position: relative;
    background: #FFFFFF;
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    max-width: 90%;
    width: 400px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.5) translateY(-50px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1;
}

.dark .success-popup-content {
    background: #0E0E13;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.success-popup.active .success-popup-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 50%;
    animation: iconPulse 0.6s ease-out 0.3s both;
}

@keyframes iconPulse {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success-icon {
    width: 48px;
    height: 48px;
    color: #FFFFFF;
    stroke-width: 3;
    animation: iconCheck 0.5s ease-out 0.5s both;
}

@keyframes iconCheck {
    0% {
        stroke-dasharray: 0 100;
        opacity: 0;
    }
    100% {
        stroke-dasharray: 100 0;
        opacity: 1;
    }
}

.success-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
}

.dark .success-title {
    color: #FFFFFF;
}

.success-message {
    font-size: 1rem;
    color: #6B7280;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.dark .success-message {
    color: #9CA3AF;
}

.success-close-btn {
    padding: 0.75rem 2rem;
    background: #007BFF;
    color: #FFFFFF;
    border: none;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'DM Sans', sans-serif;
}

.success-close-btn:hover {
    background: #0069D9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

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

/* Popup exit animation */
.success-popup.closing .success-popup-content {
    animation: popupOut 0.3s ease-in forwards;
}

.success-popup.closing .success-popup-overlay {
    opacity: 0;
}

@keyframes popupOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
}

