/* Create Event Page Styles */
.create-event-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
}

.create-event-container {
    min-height: 100vh;
    background: #f8fafc;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: visible;
}

.create-event-content {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

/* Header */
.create-event-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.back-button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #374151;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.back-button:hover {
    background-color: #f3f4f6;
}

.create-event-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* Event Cards */
.create-event-page .event-card {
    background: white !important;
    border-radius: 0.75rem !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 1rem !important;
    overflow: visible !important;
}

.event-card {
    background: white !important;
    border-radius: 0.75rem !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 1rem !important;
    overflow: visible !important;
}

.create-event-page .card-header {
    padding: 1.5rem 1.5rem 0.75rem 1.5rem !important;
    background: white !important;
    border-bottom: none !important;
    border-radius: 0.75rem 0.75rem 0 0 !important;
}

.card-header {
    padding: 1.5rem 1.5rem 0.75rem 1.5rem !important;
    background: white !important;
    border-bottom: none !important;
    border-radius: 0.75rem 0.75rem 0 0 !important;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    line-height: 1.25;
}

.card-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    overflow: visible;
}

/* Custom Event Type Dropdown - Scoped to create-event-page */
.create-event-page .custom-dropdown {
    position: relative;
    width: 100%;
    z-index: 1000;
}

.create-event-page .dropdown-trigger {
    width: 100%;
    height: 47px;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: #f0f9ff;
    font-size: 1rem;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.create-event-page .dropdown-trigger:hover {
    border-color: #66A6FF;
    background-color: white;
}

.create-event-page .dropdown-value {
    flex: 1;
    text-align: left;
}

.create-event-page .dropdown-arrow {
    transition: transform 0.2s;
}

.create-event-page .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1001;
    margin-top: 4px;
    overflow: visible;
    max-height: 192px;
    overflow-y: auto;
}

.create-event-page .dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease;
    background-color: transparent;
    color: #1f2937;
    font-size: 14px;
    width: 100%;
    text-align: left;
    border: none;
}

.create-event-page .dropdown-item:hover {
    background-color: #FFCAA8 !important;
    color: #1f2937;
}

.create-event-page .dropdown-item.selected {
    background-color: transparent;
    color: #1f2937;
}

.check-icon {
    flex-shrink: 0;
}

/* Children Selection */
.children-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.child-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    border: none;
    border-radius: 0.5rem;
    margin: 0;
    border-bottom: 1px solid #f3f4f6;
}

.child-item:hover {
    background-color: #f9fafb;
}

.child-item.selected {
    background-color: #eff6ff;
    border: 1px solid #66A6FF;
    border-radius: 0.5rem;
}

.child-item:last-child {
    border-bottom: none;
}

.child-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.child-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.child-name {
    font-weight: 500;
    color: #111827;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.25;
}

.child-age {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.25;
}

/* Contact Information */
.contact-section {
    margin-bottom: 1rem;
}

.contact-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Contact Select - Scoped to create-event-page */
.create-event-page .contact-select {
    width: 100%;
    height: 47px;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: #f0f9ff;
    font-size: 1rem;
    color: #374151;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 16px;
    transition: border-color 0.2s, background-color 0.2s;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    line-height: 1.5;
}

.create-event-page .contact-select:hover {
    border-color: #66A6FF;
    background-color: white;
}

.contact-separator {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0.75rem 0;
}

.new-contact-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-field {
    display: flex;
    flex-direction: column;
}

.contact-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: #374151;
    transition: border-color 0.2s;
}

.contact-input:focus {
    outline: none;
    border-color: #66A6FF;
}

/* Event Details Form */
.event-details-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    background-color: white;
    transition: border-color 0.2s, background-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #66A6FF;
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Date Input */
.date-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.date-icon {
    position: absolute;
    left: 0.75rem;
    color: #6b7280;
    pointer-events: none;
}

.date-input {
    padding-left: 2.75rem;
}

.time-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.time-icon {
    position: absolute;
    left: 0.75rem;
    color: #6b7280;
    pointer-events: none;
}

/* Time Fields */
.time-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.time-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    background-color: white;
    transition: border-color 0.2s, background-color 0.2s;
    cursor: pointer;
}

.time-input:focus {
    outline: none;
    border-color: #66A6FF;
}

.time-input:hover {
    border-color: #66A6FF;
}

/* Textarea */
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    background-color: white;
    resize: vertical;
    min-height: 3rem;
    font-family: inherit;
    transition: border-color 0.2s, background-color 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: #66A6FF;
}

.form-textarea::placeholder {
    color: #9ca3af;
}

/* Create Event Button */
.create-event-button {
    width: 100%;
    background-color: #66A6FF;
    color: #FFFFFF;
    border: none;
    border-radius: 1rem;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: "Nunito Sans", sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    height: 40px;
}

.create-event-button:hover {
    background-color: #5a9bff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 166, 255, 0.3);
}

.create-event-button:active {
    background-color: #4e8fff;
    transform: translateY(0);
}

/* Validation Messages */
.validation-message {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .create-event-container {
        padding: 0.5rem;
    }
    
    .create-event-content {
        max-width: 100%;
    }
    
    .time-fields {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .create-event-title {
        font-size: 1.5rem;
    }
}

/* Loading State */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #66A6FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
