/* Ajusta o CSS para o formulário e remove o botão de maneira elegante */
.shipping-calculator-button {
    display: none !important;
}

.shipping-calculator-form {
    display: block !important;
}

#calc_shipping_country, #calc_shipping_state, #calc_shipping_city {
    display: none !important;
}

#calc_shipping_postcode_field {
    width: 100%;
    margin: none;
    padding: 0px;
}

input[name="calc_shipping_postcode"] {
    width: 100%;
    display: block;
}

button[name="calc_shipping"] {
    width: 100%;
    display: block;
    margin-top: 5px !important;
}

.woocommerce-shipping-destination {
    display: none;
}


/* Popup buscar CEP */
#wc-frete-smart-find-cep-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 70px 30px 30px 30px;
    max-width: 600px;
    width: 90%;
    height: 90%;
    z-index: 9999999999 !important;
    overflow: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Variação para mobile */
@media (max-width: 768px) {
    #wc-frete-smart-find-cep-popup {
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

#wc-frete-smart-find-cep-popup.active {
    display: block;
}

#wc-frete-smart-find-cep-form select,
#wc-frete-smart-find-cep-form input {
    width: 100% !important;
    height: 50px !important;
    border: 2px solid #ececec !important;
    margin-bottom: 10px;
}

#wc-frete-smart-find-cep-form select:focus,
#wc-frete-smart-find-cep-form input:focus {
    border-color: black !important;
}

.popup-label {
    font-size: 11px !important;
    font-weight: normal !important;
}

#wc-frete-smart-find-cep-result {
    font-size: 14px;
    margin-top: 20px;
}

#find-cep-buscar {
    width: 100% !important;
    height: 50px !important;
    font-size: 13px;
    margin-top: 10px;
}

.cep-item {
    cursor: pointer;
    margin-bottom: 15px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #ebebeb;
    transition: all 0.2s ease;
    position: relative;
}

.cep-item:hover {
    border-color: #ccc;
    background: #f2f2f2;
}

.cep-item strong {
    font-size: 14px;
    color: black;
    font-weight: bold;
}

.cep-item .cep-item-rua {
    color: black;
}

.cep-item span {
    display: block;
    font-size: 13px;
    line-height: 16px;
    color: #999;
}

.usar-cep-btn {
    font-size: 13px;
    line-height: 0px;
    background-color: transparent;
    color: black !important;
    padding: 0px !important;
    border: none !important;
    position: absolute;
    right: 20px;
    top: 50%;
    text-transform: none;
    letter-spacing: 0px;
}


/* Popup inserir CEP */
#wc-frete-smart-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 70px 30px 20px 30px;
    z-index: 999999999 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 350px;
    border-radius: 10px;
}

#wc-frete-smart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999998 !important;
}

.popup-title {
    font-size: 18px !important;
    line-height: 22px !important;
    width: 250px;
    display: block;
}

.popup-desc {
    font-size: 14px;
    line-height: 18px;
    color: #999;
}

.popup-close {
    position: absolute;
    top: 30px;
    left: 30px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
    color: #ccc;
    line-height: 0px;
}

#wc-frete-smart-form {
    width: 100%;
    display: flex;
    justify-content: space-between;
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 10px 10px 10px 15px;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
}

#wc-frete-smart-form.focused {
    border-color: black; /* Cor da borda quando o input está em foco */
}

#wc-frete-smart-form i {
    color: #ccc;
    line-height: 45px;
}

#wc-frete-smart-form input {
    width: 75%;
    height: 45px !important;
    margin: 0px !important;
    border: none !important;
    font-size: 18px;
}

#wc-frete-smart-form button {
    width: 25%;
    height: 45px !important;
    cursor: pointer;
    margin: 0px !important;
    font-size: 13px;
    padding: 0px !important;
    line-height: 0px !important;
}

#wc-frete-smart-opcoes {
    width: 100% !important;
    height: auto;
    display: inline-block;
}

#wc-frete-smart-mensagem {
    width: 100% !important;
    margin-top: 0px;
    display: none;
    font-size: 13px;
    background-color: white !important;
    font-weight: bold;
}

#wc-frete-smart-mensagem.success {
    color: green;
}

#wc-frete-smart-mensagem.error {
    color: red;
}

#wc-frete-smart-informar-depois, #wc-frete-smart-nao-sei-cep {
    font-size: 14px;
    text-decoration: underline;
    color: #999 !important;
    font-weight: bold;
    display: inline;
}

#wc-frete-smart-informar-depois {
    float: left;
}

#wc-frete-smart-nao-sei-cep {
    float: right;
}


/* Calculadora de frete */
#wc-frete-smart-calculadora {
    margin-top: 30px;
    margin-bottom: 30px;
}

#wc-frete-smart-calculadora h4 {
    font-size: 14px;
    font-weight: normal !important;
    margin-bottom: 0px !important;
    color: #999;
    line-height: 20px;
}

#wc-frete-smart-inserir-cep span {
    font-size: 14px;
    font-weight: bold;
}

#wc-frete-smart-inserir-cep i {
    font-size: 12px;
    position: relative;
    top: -1px;
}

#wc-frete-smart-resultados {
    margin-top: 10px;
    font-size: 13px;
    color: #999;
}

.wc-frete-smart-resultado {
    display: flex;
    justify-content: space-between;
    border: 1px dashed #ccc;
    background-color: #cccccc10;
    border-radius: 5px;
    margin-bottom: 10px;
    padding: 4px 8px !important;
}


/* Skeleton loading */
.frete-loading {
    width: 100%;
}

.loading-line {
    width: 100%;
    height: 30px;
    margin-bottom: 10px;
    border-radius: 5px;
    background: #f0f0f0;
    animation: skeleton-loading 1.2s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-color: #f0f0f0;
    }
    50% {
        background-color: #e0e0e0;
    }
    100% {
        background-color: #f0f0f0;
    }
}