/* Updated background color and fonts for widget containers */

/* Import Noto Sans font */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans', sans-serif;
}

svg path, svg circle {
  fill: black;
}

a {
  text-decoration: none;
}

/* Widget Container */
.widget-container {
    font-family: 'Noto Sans', sans-serif;
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #FDE9EB; /* Changed from background-image to solid color */
    color: #333; /* Changed text color to dark for better contrast */
    padding: 5vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.widget-container-mobile {
    font-family: 'Noto Sans', sans-serif;
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #FDE9EB; /* Changed from background-image to solid color */
    color: #333; /* Changed text color to dark for better contrast */
    padding: 10px 4px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
}

/* Logo */
.logo-container {
    margin-bottom: 5vh;
    text-align: center;
    width: 240px;
    max-width: 60%;
}

.logo {
    width: 100%;
    height: auto;
    fill: white;
}

/* Titles */
.title {
    font-family: 'Noto Sans', sans-serif;
    font-size: clamp(16px, 5vw, 32px);
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.subtitle {
    color: #333; /* Changed from #cdff00 for better contrast with pink background */
    font-size: clamp(16px, 4vw, 20px);
    margin-bottom: 4vh;
}

.subtitle-mobile {
    color: #333; /* Changed from white for better contrast */
    font-size: clamp(14px, 4vw, 20px);
    text-decoration: none;
}

/* Form */
#padel-search-form {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Dropdowns */
.dropdown-container {
    position: relative;
    margin-bottom: 3vh;
    width: 100%;
}

.dropdown-label {
    font-family: 'Noto Sans', sans-serif;
    font-size: clamp(18px, 5vw, 22px);
    margin-bottom: 8px;
    text-align: left;
}

.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.05);
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    color: #333;
    padding: 12px 15px;
    cursor: pointer;
    font-size: clamp(14px, 4vw, 18px);
    font-family: 'Noto Sans', sans-serif;
    text-align: left;
    width: 100%;
}

.dropdown-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
    padding-right: 10px;
}

.dropdown-header:focus {
    outline: none;
}

.chevron {
    color: black;
    font-size: 20px;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.chevron.open {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 0 0 4px 4px;
    z-index: 10;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    opacity: 0;
}

.dropdown-menu.show {
    max-height: 250px;
    opacity: 1;
    overflow-y: auto;
    animation: fadeIn 0.2s ease-out;
}

/* Dropdown Items */
.dropdown-item {
    padding: 12px 15px 12px 40px;
    color: #333;
    cursor: pointer;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: clamp(14px, 4vw, 16px);
    font-family: 'Noto Sans', sans-serif;
    position: relative;
}

.dropdown-item:hover {
    background-color: #f8f8f8;
}

.dropdown-item.selected {
    background-color: #f0f8ff;
}

.dropdown-item:last-child {
    border-bottom: none;
}

/* Checkboxes */
.checkbox {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid #aaa;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-item.selected .checkbox {
    border-color: #4a90e2;
    background-color: #4a90e2;
}

.checkbox::after {
    content: '';
    display: none;
    width: 8px;
    height: 5px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg) translate(1px, -1px);
}

.dropdown-item.selected .checkbox::after {
    display: block;
}

/* Tags */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
    width: 100%;
}

.selection-tag {
    display: inline-flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
    border-radius: 15px;
    padding: 3px 10px;
    font-size: 14px;
    margin-right: 5px;
    margin-bottom: 5px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-remove {
    margin-left: 6px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.hidden-select {
    display: none;
}

/* Button */
.search-button {
    background-color: black;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 25px;
    font-size: clamp(16px, 4vw, 18px);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 3vh auto 0;
    width: 100%;
    max-width: 400px;
    text-align: center;
    font-family: 'Noto Sans', sans-serif;
    font-weight: normal;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-button:hover {
    background-color: #333;
}

.search-button svg {
    margin-left: 8px;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.search-button-mobile {
    background-color: black;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 3px 4px;
    font-size: clamp(14px, 4vw, 18px);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    font-family: 'Noto Sans', sans-serif;
    font-weight: normal;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.search-button-mobile:hover {
    background-color: #333;
    text-decoration: none;
}

.search-button-mobile svg {
    padding-top: 5px;
    margin-left: 4px;
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Additional CSS for upward-facing dropdowns */
.custom-dropdown.dropdown-upward .dropdown-menu {
    bottom: 100%;
    top: auto;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
}

/* Improved focus states for accessibility */
.dropdown-header:focus {
    outline: 2px solid rgba(0, 0, 0, 0.2);
    outline-offset: 2px;
}

.dropdown-item:focus {
    outline: 2px solid #4a90e2;
    background-color: #f0f8ff;
}

.search-button:focus {
    outline: 2px solid #666;
    outline-offset: 2px;
}

/* Animation for dropdown */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Media Queries */
@media (min-width: 768px) {
    .widget-container {
        padding: 30px;
        min-height: auto;
        aspect-ratio: 2/3;
    }

    .logo-container {
        margin-bottom: 25px;
    }

    .subtitle {
        margin-bottom: 25px;
    }

    .dropdown-container {
        margin-bottom: 15px;
    }

    .search-button {
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .widget-container {
        padding: 20px;
    }

    .logo-container {
        margin-bottom: 20px;
    }

    .dropdown-container {
        margin-bottom: 15px;
    }

    .search-button {
        margin-top: 15px;
        width: 100%;
    }

    .selection-tag {
        font-size: 12px;
        padding: 2px 8px;
    }

    .tag-remove {
        font-size: 14px;
    }

    .dropdown-menu.show {
        max-height: 200px;
    }
}

/* Inline tag styling */
.inline-tag {
    display: inline-flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
    border-radius: 12px;
    padding: 2px 10px;
    margin: 0 2px;
    font-size: 18px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inline-tag .tag-remove {
    margin-left: 5px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    opacity: 0.8;
}

.inline-tag .tag-remove:hover {
    opacity: 1;
}

/* Also update the regular tags for consistency */
.selection-tag {
    display: inline-flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
    border-radius: 15px;
    padding: 4px 12px;
    font-size: 18px;
    margin-right: 5px;
    margin-bottom: 5px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-remove {
    margin-left: 8px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

/* Increase dropdown text font size for better balance */
.dropdown-header {
    font-size: clamp(16px, 4vw, 20px);
}

/* Make dropdown text area able to handle inline elements */
.dropdown-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
    padding-right: 10px;
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    max-width: 100%;
}

/* Prevent browser focus outlines */
.dropdown-header:focus,
.dropdown-item:focus,
.tag-remove:focus,
.search-button:focus {
    outline: none;
}

/* Remove tap highlight on mobile devices */
.dropdown-header,
.dropdown-item,
.tag-remove,
.selection-tag,
.inline-tag,
.search-button {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Custom focus styles that can be used if needed for accessibility */
.dropdown-header:focus-visible {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3);
}

.dropdown-item:focus-visible {
    background-color: #f0f8ff;
}

.search-button:focus-visible {
    box-shadow: 0 0 0 2px #666;
}

/* Make the arrow icon white */
svg[data-v-82241731] path {
  fill: white;
}
