/* Estilos Gerais do Formulário Amafiliados */
.ama-registration-form {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    font-family: 'Open Sans', 'Helvetica', sans-serif;
}

/* Campos de Formulário */
.ama-form-section h4 {
    color: #6ec1e4;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.ama-field-group {
    margin-bottom: 15px;
}

.ama-field-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ama-field-group input[type="text"],
.ama-field-group input[type="email"],
.ama-field-group input[type="password"],
.ama-field-group input[type="tel"],
.ama-field-group input[type="file"],
.ama-field-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.ama-field-group input:focus {
    border-color: #6ec1e4;
    background: #fff;
}

/* Campos pendentes (Completar endereço) */
.ama-field-pending.ama-field-group input,
.ama-field-pending.ama-field-group select,
.ama-field-pending .ama-field-group input,
.ama-field-pending .ama-field-group select {
    border-color: #dba846;
    background: #fffef5;
}
.ama-field-pending.ama-field-group label,
.ama-field-pending .ama-field-group label {
    color: #8a6914;
}

.ama-field-row {
    display: flex;
    gap: 15px;
}

.ama-col-50 {
    width: 50%;
}

.ama-col-33 {
    width: 33.33%;
}

.ama-col-66 {
    width: 66.66%;
}

/* Botões */
.ama-btn-submit {
    background: #dba846;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.ama-btn-submit:hover {
    background: #c99635;
}

/* Venda no balcão: botão com alta especificidade para sobrescrever WooCommerce */
#ama-balcao-form .ama-balcao-submit-wrap button.ama-btn-submit {
    background: #dba846;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}
#ama-balcao-form .ama-balcao-submit-wrap button.ama-btn-submit:hover {
    background: #70c1c5;
}

.ama-checkbox-group label {
    font-weight: normal;
    display: inline;
}

.ama-show-password {
    margin-top: -8px;
    margin-bottom: 15px;
}
.ama-show-password .ama-checkbox-inline {
    font-weight: normal;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ama-show-password input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* Estilo Erros/Sucesso */
.ama-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.ama-message.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.ama-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Formulário Dados bancários (Minha Conta) */
.ama-bank-form-card {
    max-width: 600px;
    margin: 1.5em 0;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    font-family: 'Open Sans', 'Helvetica', sans-serif;
}

.ama-bank-form .form-row.ama-field-group {
    margin-bottom: 15px;
}

.ama-bank-form .form-row.ama-field-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ama-bank-form .form-row.ama-field-group input[type="text"],
.ama-bank-form .form-row.ama-field-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.ama-bank-form .form-row.ama-field-group input:focus,
.ama-bank-form .form-row.ama-field-group select:focus {
    border-color: #6ec1e4;
    background: #fff;
}

.ama-bank-form .ama-btn-submit {
    margin-top: 10px;
    max-width: 100%;
}

/* Venda no balcão (Minha Conta) */
.ama-balcao-card {
    max-width: 700px;
    margin: 1.5em 0;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    font-family: 'Open Sans', 'Helvetica', sans-serif;
}

.ama-balcao-card .ama-balcao-section {
    margin-bottom: 24px;
}

.ama-balcao-card .ama-balcao-section:last-child {
    margin-bottom: 0;
}

.ama-balcao-section-title {
    color: #6ec1e4;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1em;
}

.ama-balcao-radio-group {
    margin-bottom: 10px;
}

.ama-balcao-radio-label {
    display: inline;
    font-weight: 600;
    cursor: pointer;
}

.ama-balcao-radio-label input {
    margin-right: 8px;
}

.ama-balcao-radio-desc {
    margin-left: 24px;
    color: #666;
    font-size: 0.95em;
}

.ama-balcao-prescritor-box {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.ama-balcao-card .ama-field-group {
    margin-bottom: 15px;
}

.ama-balcao-card .ama-field-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ama-balcao-search-wrap {
    position: relative;
    display: block;
}

/* Desktop: dropdown logo abaixo do campo, largura limitada (estilo header); mobile: largura total */
@media (min-width: 769px) {
    .ama-balcao-card .ama-field-group.ama-balcao-search-wrap,
    .ama-balcao-card #ama-balcao-product-search-wrap {
        max-width: 420px !important;
        width: 100%;
    }
    .ama-balcao-card .ama-balcao-search-dropdown,
    .ama-balcao-card #ama_balcao_product_dropdown {
        max-width: 420px !important;
        width: 100%;
        left: 0 !important;
        right: 0 !important;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .ama-balcao-card .ama-field-group.ama-balcao-search-wrap {
        max-width: none !important;
    }
    .ama-balcao-card .ama-balcao-search-dropdown {
        max-width: none !important;
    }
}

.ama-balcao-search-input {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.ama-balcao-search-input:focus {
    border-color: #6ec1e4;
    background: #fff;
}

.ama-balcao-search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.ama-balcao-dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

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

.ama-balcao-dropdown-item:hover {
    background: #f0f8fc;
    color: #333;
}

.ama-balcao-dropdown-empty {
    padding: 12px;
    color: #666;
    font-size: 14px;
}

.ama-balcao-selected {
    margin-top: 8px;
    font-size: 14px;
    color: #666;
}

.ama-balcao-selected.ama-balcao-has-selection {
    color: #155724;
    font-weight: 600;
}

.ama-balcao-items-table {
    margin-top: 12px;
    width: 100%;
}

/* Remove borda superior da tabela que gera linha horizontal indesejada */
.ama-balcao-card .ama-balcao-items-table,
.ama-balcao-card .ama-balcao-items-table thead th {
    border-top: none !important;
}

.ama-balcao-items-table .ama-balcao-qty-input {
    width: 70px;
}

.ama-balcao-submit-wrap {
    margin-top: 20px;
}

/* Localizador "Onde Encontrar" – pin de localização por perfil */
.ama-pin.leaflet-div-icon {
    background: none !important;
    border: none !important;
}
.ama-pin {
    position: relative;
    width: 26px;
    height: 38px;
}
/* Cabeça do pin (círculo) */
.ama-pin > span {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
/* Ponta do pin (triângulo) */
.ama-pin::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 20px solid;
}
.ama-pin--prescritor > span {
    background: #3388ff;
}
.ama-pin--prescritor::after {
    border-top-color: #3388ff;
}
.ama-pin--distribuidor > span {
    background: #e67e22;
}
.ama-pin--distribuidor::after {
    border-top-color: #e67e22;
}
/* Pin customizado com cor por perfil (--pin-color) */
.ama-pin.ama-pin-custom .ama-pin-inner {
    position: relative;
    width: 26px;
    height: 38px;
}
/* Cabeça do pin (círculo) - mesmo estilo de .ama-pin > span */
.ama-pin.ama-pin-custom .ama-pin-inner > span {
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    background: var(--pin-color, #3388ff) !important;
}
.ama-pin.ama-pin-custom .ama-pin-inner::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 20px solid var(--pin-color, #3388ff);
}