/**
 * Popup CEP - Frontend Styles
 * Todos os estilos usam prefixo único POPUP_CEP_ para evitar conflitos
 */

/* Reset e box-sizing */
.POPUP_CEP_container * {
    box-sizing: border-box;
}

.POPUP_CEP_container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.POPUP_CEP_buttons-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 30px 0;
}

.POPUP_CEP_btn {
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.POPUP_CEP_btn:hover {
    background: white;
    color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Modal/Popup */
.POPUP_CEP_modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    animation: POPUP_CEP_fadeIn 0.3s ease;
}

@keyframes POPUP_CEP_fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.POPUP_CEP_modal-content {
    background-color: white;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
    border-radius: 30px;
    width: 90%;
    max-width: 650px;
    min-height: 250px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: POPUP_CEP_slideDown 0.3s ease;
    overflow: hidden;
    border: 4px solid transparent;
}

@keyframes POPUP_CEP_slideDown {
    from {
        transform: translate(-50%, -60%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.POPUP_CEP_close {
    color: #fff;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.POPUP_CEP_close:hover,
.POPUP_CEP_close:focus {
    color: #000;
}

.POPUP_CEP_modal-header {
    margin-bottom: 0;
    clear: both;
}

.POPUP_CEP_modal-header img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    border: 10px solid white;
    box-sizing: border-box;
    border-radius: 30px 30px 0 0;
}

.POPUP_CEP_modal-body {
    padding: 15px;
}

.POPUP_CEP_etapa2 {
    padding-top: 0;
}

.POPUP_CEP_modal-header h2 {
    color: #667eea;
    margin: 0 0 10px 0;
}

.POPUP_CEP_etapa {
    display: none;
    padding: 20px;
}

.POPUP_CEP_etapa.ativa {
    display: block;
}

.POPUP_CEP_titulo-confirmacao {
    color: #00a8e8;
    font-size: 1.4em;
    margin-bottom: 20px;
    text-align: center;
}

.POPUP_CEP_endereco-info {
    background: #f5f5f5;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.POPUP_CEP_endereco-info p {
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.POPUP_CEP_endereco-info p:last-child {
    margin-bottom: 0;
}

.POPUP_CEP_endereco-info strong {
    color: #00a8e8;
    font-weight: 600;
}

.POPUP_CEP_btn-voltar {
    width: 100%;
    padding: 12px 10px;
    background: #e91e63;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.2;
    min-height: 48px;
}

.POPUP_CEP_btn-voltar:hover {
    background: #c2185b;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(233, 30, 99, 0.4);
}

.POPUP_CEP_buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .POPUP_CEP_buttons-grid {
        grid-template-columns: 1fr;
    }
}

.POPUP_CEP_form-group {
    margin-bottom: 12px;
    text-align: left;
}

.POPUP_CEP_form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

.POPUP_CEP_etapa2 .POPUP_CEP_form-group label {
    margin-bottom: 6px;
    font-size: 15px;
}

.POPUP_CEP_form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #d0d0d0;
    border-radius: 12px;
    font-size: 18px;
    transition: border-color 0.3s ease;
    background: white;
}

.POPUP_CEP_form-group input:focus {
    outline: none;
    border-color: #00a8e8;
}

.POPUP_CEP_btn-buscar {
    width: 100%;
    padding: 12px 10px;
    background: #6fba2c;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    line-height: 1.2;
    min-height: 48px;
}

.POPUP_CEP_btn-buscar:hover {
    background: #5fa024;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(111, 186, 44, 0.4);
}

.POPUP_CEP_btn-buscar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.POPUP_CEP_btn-continuar {
    width: 100%;
    padding: 12px 10px;
    background: #6fba2c;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.2;
    min-height: 48px;
}

.POPUP_CEP_btn-continuar:hover {
    background: #5fa024;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(111, 186, 44, 0.4);
}

.POPUP_CEP_loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.POPUP_CEP_loading.show {
    display: block;
}

.POPUP_CEP_spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00a8e8;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: POPUP_CEP_spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes POPUP_CEP_spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.POPUP_CEP_error {
    color: #e74c3c;
    margin-top: 10px;
    display: none;
}

.POPUP_CEP_error.show {
    display: block;
}

/* Estilos inline específicos do HTML (mantidos como fallback) */
.POPUP_CEP_resultado {
    margin-top: 20px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    text-align: left;
    display: none;
}
