/**
 * Simplified Form Elements Styling for WP Future Calendar
 */

/* Global form element improvements */
.wp-future-calendar-wrapper input,
.wp-future-calendar-wrapper select,
.wp-future-calendar-wrapper button {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Select styling */
.calendar-filter select {
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fff;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6"><path d="M0 0l6 6 6-6z" fill="%23333"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    padding-right: 30px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.calendar-filter select:focus {
    outline: none;
    border-color: #4a69bd;
    box-shadow: 0 0 0 2px rgba(74, 105, 189, 0.1);
}

/* Simplified search input styling - Fixed positioning issues */
.calendar-search {
    position: relative;
    margin-bottom: 16px;
    flex: 1;
}

.calendar-search label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.calendar-search-input {
    width: 100%;
    height: 42px;
    padding: 8px 40px 8px 12px; /* Right padding for the search icon */
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.calendar-search-input:focus {
    outline: none;
    border-color: #4a69bd;
    box-shadow: 0 0 0 2px rgba(74, 105, 189, 0.1);
}

/* Fixed position for search button */
.calendar-search-button {
    position: absolute;
    top: 28px; /* Position below label */
    right: 1px; /* Slight offset from right border */
    width: 40px;
    height: 40px; /* Slightly smaller than input height */
    border: none;
    background-color: #4a69bd;
    color: white;
    cursor: pointer;
    border-radius: 0 9px 9px 0; /* Rounded only on right side, slightly smaller than input */
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* When no label is present, adjust button position */
.calendar-search:not(:has(label)) .calendar-search-button {
    top: 1px;
}

.calendar-search-button:hover {
    background-color: #3a5cbd;
}

.calendar-search-button i {
    font-size: 16px;
}

/* Calendar filters layout */
.calendar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.calendar-filter {
    flex: 1;
    min-width: 160px;
    margin-bottom: 16px;
}

.calendar-filter label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

/* Mobile responsiveness */
@media screen and (max-width: 768px) {
    .calendar-filters {
        flex-direction: column;
        gap: 8px;
    }
    
    .calendar-filter,
    .calendar-search {
        width: 100%;
        flex: none;
    }
    
    .calendar-filter,
    .calendar-search {
        margin-bottom: 12px;
    }
    
    /* Ensure button is properly aligned on mobile */
    .calendar-search-button {
        height: 40px;
    }
}
