/* EventHub Search Widget Styles */
.eventhub-search-container {
    position: relative;
    width: 100%;
}

.eventhub-search-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.eventhub-date-inputs-wrapper {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.eventhub-date-field {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
}

.eventhub-date-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eventhub-date-input-wrapper {
    position: relative;
    width: 100%;
}

.eventhub-date-input {
    width: 100%;
    padding: 12px 15px;
    padding-right: 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.eventhub-date-input.eventhub-date-empty {
    color: transparent !important;
}

.eventhub-date-input.eventhub-date-empty::-webkit-datetime-edit {
    color: transparent !important;
}

.eventhub-date-input.eventhub-date-empty::-webkit-datetime-edit-fields-wrapper {
    color: transparent !important;
}

.eventhub-date-input.eventhub-date-empty::-webkit-datetime-edit-text {
    color: transparent !important;
}

.eventhub-date-input.eventhub-date-empty::-webkit-datetime-edit-month-field,
.eventhub-date-input.eventhub-date-empty::-webkit-datetime-edit-day-field,
.eventhub-date-input.eventhub-date-empty::-webkit-datetime-edit-year-field {
    color: transparent !important;
}

.eventhub-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    z-index: 10;
    position: relative;
    opacity: 0;
    background: transparent;
    width: 20px;
    height: 20px;
}

.eventhub-date-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: auto;
    font-size: 18px;
    z-index: 3;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.eventhub-date-placeholder {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #999;
    font-size: 14px;
    z-index: 2;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    white-space: nowrap;
    visibility: visible;
    opacity: 1;
}

.eventhub-date-input-wrapper.has-value .eventhub-date-placeholder {
    opacity: 0 !important;
    visibility: hidden !important;
}

.eventhub-date-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.eventhub-search-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.eventhub-search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background-color: #fff;
    width: 100%;
}

.eventhub-search-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.eventhub-search-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.eventhub-search-button img {
    max-width: 24px;
    max-height: 24px;
    display: block;
}

.eventhub-search-button-image {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-width: auto !important;
    width: auto !important;
    height: auto !important;
}

.eventhub-search-button-image:hover {
    transform: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.eventhub-search-button-image:active {
    transform: none !important;
    background: transparent !important;
}

.eventhub-search-button-image img {
    display: block;
    margin: 0;
    object-fit: contain;
}

.eventhub-search-icon {
    font-size: 18px;
    line-height: 1;
}

.eventhub-search-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.eventhub-search-button:active {
    transform: translateY(0);
}

/* Search Results Dropdown */
.eventhub-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 5px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
}

.eventhub-search-results-category {
    padding: 12px 15px;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    margin: 0;
}

.eventhub-search-results-category:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.eventhub-search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    gap: 12px;
}

.eventhub-search-result-item:last-child {
    border-bottom: none;
}

.eventhub-search-result-item:hover {
    background-color: #f8f8f8;
    text-decoration: none;
}

.eventhub-search-result-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.eventhub-search-result-content {
    flex: 1;
    min-width: 0;
}

.eventhub-search-result-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #333;
}

.eventhub-search-result-event {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.eventhub-search-result-date {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    margin-top: 4px;
    margin-bottom: 4px;
}

.eventhub-search-result-description {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 4px;
}

/* Error Message */
.eventhub-search-error-message {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .eventhub-date-inputs-wrapper {
        flex-direction: column;
    }
    
    .eventhub-date-field {
        width: 100%;
    }
    
    .eventhub-search-button {
        min-width: auto;
    }
}