@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* ===== Container ===== */
.crowd-form-container {
    width: 100% !important;
    max-width: 576px !important;
    margin: 0 auto !important;
    background: #FFFFFF !important;
    border-radius: 15px !important;
    padding: 40px !important;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.08) !important;
    box-sizing: border-box !important;
}

.crowd-form {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.crowd-form-fields {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
}

/* ===== Inputs ===== */
.crowd-input {
    width: 100% !important;
    height: 52px !important;
    background: #F2F2F2 !important;
    border: 1px solid #E6E6E6 !important;
    border-radius: 4px !important;
    padding: 16px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    line-height: 20px !important;
    color: #131313 !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.crowd-input::placeholder {
    color: #8A8A8A !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}

.crowd-input:focus {
    border-color: #4845CA !important;
    background: #FFFFFF !important;
}

.crowd-input.crowd-input-error {
    border-color: #dc3545 !important;
}

/* ===== Select ===== */
.crowd-select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%238A8A8A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-color: #F2F2F2 !important;
    cursor: pointer !important;
    color: #8A8A8A !important;
    padding-right: 40px !important;
}

.crowd-select:focus {
    background-color: #FFFFFF !important;
}

.crowd-select option {
    color: #131313 !important;
    background: #FFFFFF !important;
}

.crowd-select:valid:not([value=""]) {
    color: #131313 !important;
}

/* ===== Phone Wrapper ===== */
.crowd-phone-wrapper {
    position: relative !important;
    width: 100% !important;
}

.crowd-phone-flag {
    position: absolute !important;
    left: 1px !important;
    top: 1px !important;
    bottom: 1px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 12px 0 16px !important;
    background: transparent !important;
    border-radius: 4px 0 0 4px !important;
    cursor: pointer !important;
    z-index: 2 !important;
    user-select: none !important;
}

.crowd-phone-flag:hover {
    background: rgba(0, 0, 0, 0.03) !important;
}

.crowd-phone-code {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    color: #131313 !important;
}

.crowd-phone-arrow {
    margin-left: 2px !important;
    transition: transform 0.2s ease !important;
}

.crowd-phone-arrow.crowd-arrow-up {
    transform: rotate(180deg) !important;
}

.crowd-phone-input {
    padding-left: 115px !important;
}

/* ===== Flag Images ===== */
.crowd-flag-img {
    width: 24px !important;
    height: 18px !important;
    object-fit: cover !important;
    border-radius: 2px !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* ===== Country Dropdown ===== */
.crowd-country-dropdown {
    display: none;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 320px !important;
    max-width: calc(100vw - 40px) !important;
    margin-top: 4px !important;
    background: #FFFFFF !important;
    border: 1px solid #E6E6E6 !important;
    border-radius: 8px !important;
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12) !important;
    z-index: 99999 !important;
    overflow: hidden !important;
}

.crowd-country-dropdown.crowd-dropdown-open {
    display: block !important;
}

.crowd-country-list {
    max-height: 240px !important;
    overflow-y: auto !important;
    padding: 8px 0 !important;
}

.crowd-country-list::-webkit-scrollbar {
    width: 6px !important;
}

.crowd-country-list::-webkit-scrollbar-track {
    background: #F2F2F2 !important;
}

.crowd-country-list::-webkit-scrollbar-thumb {
    background: #CCCCCC !important;
    border-radius: 3px !important;
}

.crowd-country-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 16px !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
}

.crowd-country-item:hover {
    background: #F2F2F2 !important;
}

.crowd-country-item.crowd-country-active {
    background: #4845CA !important;
}

.crowd-country-item.crowd-country-active .crowd-country-name,
.crowd-country-item.crowd-country-active .crowd-country-dial {
    color: #FFFFFF !important;
}

.crowd-country-name {
    flex: 1 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    color: #131313 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.crowd-country-dial {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    color: #8A8A8A !important;
}

.crowd-country-divider {
    height: 1px !important;
    background: #E6E6E6 !important;
    margin: 8px 0 !important;
}

/* ===== Submit Button ===== */
.crowd-submit-btn {
    width: 100% !important;
    height: 54px !important;
    background: #131313 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 6px 32px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    line-height: 24px !important;
    color: #FFFFFF !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0px 0px 0px 1px #000000, 0px 1px 2px 0px rgba(0, 0, 0, 0.64) !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.crowd-submit-btn:hover {
    background: #2d2d2d !important;
    transform: translateY(-2px) !important;
}

.crowd-submit-btn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ===== Messages ===== */
.crowd-form-message {
    margin-top: 20px !important;
    padding: 15px !important;
    border-radius: 4px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    text-align: center !important;
    display: none !important;
}

.crowd-form-message.crowd-msg-success {
    background: #d4edda !important;
    color: #155724 !important;
    display: block !important;
}

.crowd-form-message.crowd-msg-error {
    background: #f8d7da !important;
    color: #721c24 !important;
    display: block !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .crowd-form-container {
        padding: 24px !important;
    }
    
    .crowd-form-fields {
        gap: 20px !important;
    }
    
    .crowd-country-dropdown {
        width: 100% !important;
    }
}