/* 
 * Dropdown Improvements CSS
 * Complete fix for all dropdown and form styling issues
 */

/* ===== FORM LAYOUT FIXES ===== */

/* Fix overall form container */
.info-page .form {
    width: 100%;
    padding: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* Form group styling */
.info-page .form-group {
    width: 100%;
    margin: 0 0 15px 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
}

/* ===== DROPDOWN STYLING ===== */

/* Container for all dropdown selects */
.info-page .dropdown-container,
.info-page .category-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    gap: 8px;
    margin: 0 0 15px 0;
    padding: 0;
    box-sizing: border-box;
}

/* Each individual dropdown */
.info-page .category-dropdown {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    margin: 0;
    padding: 0;
}

/* DROPDOWN STYLING - HORIZONTAL TEXT CENTERING */
.info-page .category-dropdown select {
    /* Basic sizing and box model */
    width: 100%;
    height: 44px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 24px;
    box-sizing: border-box;
    
    /* Styling */
    background-color: #3c60a5;
    color: white;
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    
    /* Arrow styling - custom triangle touching the bottom edge */
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6' viewBox='0 0 12 6'%3E%3Cpath fill='%23fff' d='M0 0l6 6 6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center bottom 0;
    background-size: 12px 6px; /* Ensure size matches SVG dimensions */
    padding-bottom: 7px; /* Space for the triangle */
    
    /* Remove browser default styling */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    /* HORIZONTAL TEXT CENTERING - MOST IMPORTANT */
    text-align: center !important;
    text-align-last: center !important;
    direction: ltr !important;
    text-indent: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    
    /* Other */
    cursor: pointer;
    position: relative;
}

/* Remove IE arrow */
.info-page .category-dropdown select::-ms-expand {
    display: none;
}

/* Style dropdown options */
.info-page .category-dropdown select option {
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 1rem;
    background-color: white;
    color: #333;
    text-align: left;
    padding: 8px;
}

/* ===== INPUT FIELD STYLING ===== */

/* Style for input fields */
.info-page .form-group input[type="date"],
.info-page .form-group input[type="time"],
.info-page .form-group input[type="text"],
.info-page .form-group input[type="number"],
.info-page .form-group input[type="email"],
.info-page .form-group textarea,
.info-page .form-group select {
    width: 100%;
    font-family: 'Barlow Semi Condensed', sans-serif;
    font-size: 1rem;
    padding: 10px 15px;
    border-radius: 24px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    margin-bottom: 10px;
    display: block;
}

/* Layout for date and time on one line */
.info-page .contact-details-datetime {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px;
    width: 100%;
    margin-bottom: 10px;
}

.info-page .contact-details-datetime .form-group,
.info-page .contact-details-datetime .form-group-date,
.info-page .contact-details-datetime .form-group-time {
    width: auto !important;
    flex: 1 !important;
    margin: 0 0 10px 0 !important;
}

/* Layout for aantal personen and stad on one line */
.info-page .contact-details-personen-stad {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px;
    width: 100%;
    margin-bottom: 10px;
}

.info-page .contact-details-personen-stad .form-group,
.info-page .contact-details-personen-stad .form-group-personen {
    width: auto !important;
    flex: 1 !important;
    margin: 0 0 10px 0 !important;
}

.info-page .contact-details-personen-stad .form-group-city {
    width: auto !important;
    flex: 2 !important; /* 2/3 of the space */
    margin: 0 0 10px 0 !important;
}

/* ===== TABLET RESPONSIVE STYLES ===== */
@media (max-width: 991px) {
    /* Make dropdowns wrap on tablet */
    .info-page .dropdown-container,
    .info-page .category-container {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    /* Two columns on tablet */
    .info-page .category-dropdown {
        flex-basis: calc(50% - 5px);
        min-width: calc(50% - 5px);
        margin-bottom: 10px;
    }
}

/* ===== MOBILE RESPONSIVE STYLES ===== */
@media screen and (max-width: 767px) {
    /* Page background */
    body {
        background-color: #f8f8f8;
    }
    
    /* Main container - use almost full width */
    .info-page .container {
        width: 98%;
        margin: 0 auto;
        background-color: #ffffff;
    }
    
    /* Form container padding */
    .info-page .tabs {
        margin-left: 10px;
        margin-right: 10px;
        margin-top: 15px;
        margin-bottom: 15px;
    }
    
    /* All form elements - maximize width with minimal margins */
    .info-page .dropdown-container,
    .info-page form,
    .info-page .form-column form {
        margin: 0 auto;
        width: calc(100% - 20px) !important; /* Only 10px from each edge */
        padding: 0;
    }
    
    /* Individual dropdown containers */
    .info-page .category-dropdown {
        width: 100%;
        margin-bottom: 8px;
    }
    
    /* Blue buttons with text */
    .info-page .category-dropdown select {
        width: 100%;
        height: 44px;
        text-align: center;
        text-align-last: center;
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Form rows - maximize width */
    .info-page .form-row,
    .info-page .form-group,
    .info-page .contact-details,
    .info-page .contact-details .form-group,
    .info-page .form-actions {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 8px !important;
        box-sizing: border-box;
    }
    
    /* Form inputs */
    .info-page input[type="text"],
    .info-page input[type="email"],
    .info-page input[type="date"],
    .info-page input[type="number"],
    .info-page select,
    .info-page textarea,
    .info-page button[type="submit"] {
        width: 100%;
        height: 44px;
        box-sizing: border-box;
        border-radius: 24px;
    }
    
    /* Buttons at the bottom */
    .info-page .form-actions button {
        width: 100%;
    }
    
    /* Textarea */
    .info-page .input-textarea-container {
        width: 100% !important;
        margin: 0 0 8px 0 !important;
    }
    
    .info-page textarea {
        width: 100% !important;
        height: auto !important;
    }
    
    /* Form column */
    .info-page .form-column {
        padding: 15px 10px !important;
    }
    
    /* Two-column layout */
    .info-page .two-column-layout {
        padding: 0;
    }
}

@media (max-width: 575px) {
    /* Fix container padding */
    .info-page .tab-content {
        padding: 15px;
    }
    
    /* Full-width containers */
    .info-page .container,
    .info-page .row,
    .info-page .col-md-12,
    .info-page .col-md-6,
    .info-page .form {
        padding: 0 !important;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Stack dropdowns in one column */
    .info-page .dropdown-container,
    .info-page .category-container {
        flex-direction: column;
        width: 100%;
    }
    
    /* Full-width dropdowns */
    .info-page .category-dropdown {
        flex-basis: 100%;
        width: 100%;
        min-width: 100%;
        margin-bottom: 10px;
    }
    
    /* Ensure form controls are visible */
    .info-page .form-group {
        margin: 0 0 10px 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Ensure date and time fields are visible */
    .info-page .form-group input[type="date"],
    .info-page .form-group input[type="time"] {
        width: 100%;
        max-width: 100%;
    }
}
