/* Searchable country select - dashboard, auth, subscription, public practitioners */
weavy-country-select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.weavy-country-select {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.weavy-country-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    line-height: 1.4;
    color: #111827;
    cursor: pointer;
    text-align: left;
}

.weavy-country-select__trigger:focus {
    outline: 2px solid #000000;
    outline-offset: 1px;
}

.weavy-country-select--open .weavy-country-select__trigger {
    border-color: #000000;
}

.weavy-country-select__trigger-text--placeholder {
    color: #6b7280;
}

.weavy-country-select__chevron {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-right: 2px solid #374151;
    border-bottom: 2px solid #374151;
    transform: rotate(45deg);
    margin-top: -4px;
    transition: transform 0.15s ease;
}

.weavy-country-select--open .weavy-country-select__chevron {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.weavy-country-select__panel {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.weavy-country-select__search-wrap {
    padding: 10px;
    border-bottom: 1px solid #f3f4f6;
    background: #f9fafb;
}

.weavy-country-select__search,
.weavy-country-native-search {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.4;
    color: #111827;
    background: #ffffff;
    box-sizing: border-box;
}

.weavy-country-select__search:focus,
.weavy-country-native-search:focus {
    outline: 2px solid #000000;
    outline-offset: 1px;
    border-color: #000000;
}

.weavy-country-select__list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    max-height: 280px;
    overflow-y: auto;
}

.weavy-country-select__option {
    padding: 12px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    line-height: 1.4;
    color: #111827;
    cursor: pointer;
}

.weavy-country-select__option:hover,
.weavy-country-select__option--active {
    background-color: #f3f4f6;
}

.weavy-country-select__option--selected {
    background-color: #f9fafb;
    font-weight: 600;
}

.weavy-country-select__option-code {
    font-weight: 600;
    margin-right: 8px;
}

.weavy-country-select__option-dial {
    color: #6b7280;
    margin-right: 8px;
}

/* Variant indicatif : le déclencheur est étroit (ex. « France +33 » sur le profil) ;
   le panneau doit être plus large pour afficher noms complets + recherche sur une ligne. */
.weavy-country-select--dial .weavy-country-select__panel {
    min-width: 280px;
    right: auto;
}

.weavy-country-select--dial .weavy-country-select__option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weavy-country-select--dial .weavy-country-select__option-name {
    color: #111827;
    font-weight: 400;
    white-space: nowrap;
}

.weavy-country-select--dial .weavy-country-select__option-dial {
    color: #6b7280;
    font-weight: 400;
    margin-right: 0;
}

.weavy-country-select__empty {
    padding: 14px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #6b7280;
}

.weavy-country-native-select {
    width: 100%;
    margin-top: 8px;
    min-height: 44px;
    font-size: 15px;
}

#dashboard-app .weavy-country-select__trigger,
#subscription-app .weavy-country-select__trigger,
.weavy-auth-root .weavy-country-select__trigger {
    font-size: 14px;
    min-height: 44px;
}

.weavy-phone-country-wrap .weavy-country-select__trigger {
    min-height: 44px;
    font-size: 13px;
    padding: 10px 12px;
}

#dashboard-app .weavy-mp-browse-list__filters-panel .weavy-mp-browse-list__country-wrap {
    flex: 1 1 280px;
    min-width: min(280px, 100%);
    max-width: none;
    width: auto;
    box-sizing: border-box;
}

#dashboard-app .weavy-mp-browse-list__filters-panel .weavy-mp-browse-list__country-wrap weavy-country-select,
#dashboard-app .weavy-mp-browse-list__filters-panel .weavy-mp-browse-list__country-wrap .weavy-country-select {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
}

/* Phone row (replaces Tailwind utilities on dashboard/auth) */
.weavy-phone-input-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

@media (min-width: 640px) {
    .weavy-phone-input-row {
        flex-direction: row;
        align-items: stretch;
    }
}

.weavy-phone-country-wrap {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
}

@media (min-width: 640px) {
    .weavy-phone-country-wrap {
        width: 116px;
        flex: 0 0 116px;
    }
}

.weavy-phone-number-input {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    font-size: 13px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.weavy-phone-number-input:focus {
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

/* Beat Elementor / theme button rules on country triggers */
#dashboard-app .weavy-country-select__trigger,
#subscription-app .weavy-country-select__trigger,
.weavy-auth-root .weavy-country-select__trigger,
#dashboard-app button.weavy-country-select__trigger,
#subscription-app button.weavy-country-select__trigger,
.weavy-auth-root button.weavy-country-select__trigger {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

#dashboard-app .weavy-country-select,
#subscription-app .weavy-country-select,
.weavy-auth-root .weavy-country-select,
#dashboard-app weavy-country-select,
#subscription-app weavy-country-select,
.weavy-auth-root weavy-country-select {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

#dashboard-app .weavy-billing-form-grid > div,
#subscription-app .weavy-billing-form-grid > div {
    min-width: 0;
}
