/* Estilos Front-end - WP Cota Smart */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

/* Estilos do formulário de cotação */
body.cota-smart-page {
    margin: 0;
    padding: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    background: #f5f5f5;
}

.cota-smart-page p {
    font-size: 16px;
}

.cota-smart-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

.cota-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 30px !important;
    padding: 0 !important;
}

.cota-header .cota-form-title {
    margin: 0 !important;
    text-align: left !important;
    color: var(--cota-title-color, #333333) !important;
    font-size: 28px !important;
    font-weight: 600;
}

.cota-header .cota-logo {
    margin: 0 !important;
    text-align: right !important;
}

.cota-header .cota-logo img {
    max-width: 150px !important;
    height: auto !important;
}

.cota-smart-form {
    background: white;
    padding: 40px;
    border-radius: 20px;
    position: relative;
    min-height: 200px;
}

.cota-subtitle {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E5E5E5;
    color: var(--cota-label-color, #666666);
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

.cota-subtitle strong,
.cota-subtitle b {
    color: var(--cota-title-color, #333333);
    font-weight: 600;
}

.cota-subtitle a {
    color: var(--cota-primary-color, #0073aa);
    text-decoration: none;
}

.cota-subtitle a:hover {
    text-decoration: underline;
}

.cota-step {
    display: none;
}

.cota-step.active {
    display: block;
    transition: opacity 0.3s ease !important;
}

.cota-field {
    margin-bottom: 20px;
}

.cota-field label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: var(--cota-label-color, #666666) !important;
    font-size: 15px !important;
}

.cota-field input,
.cota-field select {
    width: 100% !important;
    height: 55px !important;
    padding: 0 15px !important;
    border: 1px solid #CECECE !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-family: "Plus Jakarta Sans", sans-serif !important;
    box-sizing: border-box !important;
    transition: border-color 0.3s ease !important;
    box-shadow: none !important;
}

.cota-field input:focus,
.cota-field select:focus {
    outline: none !important;
    border-color: var(--cota-primary-color, #0073aa) !important;
    box-shadow: none !important;
}

.cota-age-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cota-age-field {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F2F2F2;
    border-radius: 10px;
    padding: 10px 10px 10px 20px;
}

.cota-age-field label {
    flex: 1 !important;
    margin: 0 !important;
    font-weight: 600 !important;
    color: #333 !important;
    font-size: 15px !important;
}

.cota-age-controls {
    display: flex;
    align-items: center;
    gap: 0px;
}

.cota-age-btn {
    width: 55px !important;
    height: 55px !important;
    background: #CDCDCD !important;
    border: 2px solid #CDCDCD !important;
    border-radius: 0 !important;
    font-size: 20px !important;
    font-weight: bold !important;
    font-family: "Plus Jakarta Sans", sans-serif !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: #666 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
    box-shadow: none !important;
}

.cota-age-btn:first-of-type {
    border-radius: 10px 0 0 10px !important;
}

.cota-age-btn:last-of-type {
    border-radius: 0 10px 10px 0 !important;
}

.cota-age-btn:hover {
    background: var(--cota-hover-color, #005a87) !important;
    color: white !important;
    border-color: var(--cota-hover-color, #005a87) !important;
}

.cota-age-btn:focus {
    outline: none !important;
    background: var(--cota-primary-color, #0073aa) !important;
    color: white !important;
    border-color: var(--cota-primary-color, #0073aa) !important;
    box-shadow: none !important;
}

.cota-age-input {
    width: 80px !important;
    height: 55px !important;
    text-align: center !important;
    padding: 0 10px !important;
    background: #CDCDCD !important;
    border: 2px solid #CDCDCD !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: "Plus Jakarta Sans", sans-serif !important;
    color: #656565 !important;
    box-sizing: border-box !important;
}

.cota-age-input:focus {
    outline: none !important;
    background: #CDCDCD !important;
    border-color: #CDCDCD !important;
    box-shadow: none !important;
}

.cota-buttons {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.cota-btn {
    flex: 1 !important;
    height: 55px !important;
    min-height: 55px !important;
    padding: 0 25px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: "Plus Jakarta Sans", sans-serif !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.cota-btn-primary {
    background: var(--cota-primary-color, #0073aa) !important;
    color: white !important;
    border-color: var(--cota-primary-color, #0073aa) !important;
}

.cota-btn-primary:hover {
    background: var(--cota-hover-color, #005a87) !important;
    border-color: var(--cota-hover-color, #005a87) !important;
}

.cota-btn-primary:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2) !important;
}

.cota-btn-secondary {
    background: #f0f0f0 !important;
    color: #333 !important;
    border-color: #CECECE !important;
}

.cota-btn-secondary:hover {
    background: #e0e0e0 !important;
}

.cota-btn-secondary:focus {
    outline: none !important;
    border-color: var(--cota-primary-color, #0073aa) !important;
    box-shadow: none !important;
}

.cota-progress {
    display: flex;
    align-items: center;
    margin: 0 0 40px 0 !important;
    padding: 0;
    list-style: none;
    gap: 10px;
    position: relative;
    width: 100%;
    max-width: 600px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Bolinhas dos steps */
.cota-progress .cota-step-circle {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #E0E0E0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.cota-progress .cota-step-circle .step-number {
    font-size: 14px;
    font-weight: 700;
    color: #999999;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Traços conectores */
.cota-progress .cota-step-line {
    flex: 1;
    height: 6px;
    background: #E0E0E0;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Preenchimento progressivo do traço */
.cota-progress .cota-step-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background-color: var(--cota-step-color, #0073aa) !important;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    will-change: width;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Step circle ativo */
.cota-progress .cota-step-circle.active {
    background: var(--cota-step-color, #0073aa);
    border-color: var(--cota-step-color, #0073aa);
}

.cota-progress .cota-step-circle.active .step-number {
    color: #ffffff;
}

/* Step circle completado */
.cota-progress .cota-step-circle.completed {
    background: var(--cota-step-color, #0073aa);
    border-color: var(--cota-step-color, #0073aa);
}

.cota-progress .cota-step-circle.completed .step-number {
    color: #ffffff;
}

/* Traço parcialmente preenchido (step seguinte ativo) */
.cota-progress .cota-step-line.half::before {
    width: 50% !important;
}

/* Traço completamente preenchido */
.cota-progress .cota-step-line.completed::before {
    width: 100% !important;
}

.cota-results {
    margin-top: 30px;
}

.cota-plan-card {
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 15px;
    margin-top: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.cota-plan-card:hover {
    border-color: var(--cota-primary-color, #0073aa) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cota-plan-card.selected {
    border-color: var(--cota-primary-color, #0073aa) !important;
    background: #f9f9f9;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.cota-best-badge {
    position: absolute !important;
    top: -12px !important;
    left: 20px !important;
    background: var(--cota-step-color, #0073aa) !important;
    color: white !important;
    padding: 6px 15px !important;
    border-radius: 20px !important;
    font-size: 8px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.cota-plan-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 20px !important;
}

.cota-plan-info {
    flex: 1 !important;
}

.cota-plan-name {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-bottom: 8px !important;
}

.cota-plan-convenio {
    font-size: 14px !important;
    color: #666 !important;
    margin-bottom: 10px !important;
}

.cota-plan-price {
    font-size: 28px !important;
    font-weight: bold !important;
    color: var(--cota-primary-color, #0073aa) !important;
}

.cota-plan-price-note {
    font-size: 11px !important;
    color: #999 !important;
    margin-top: 5px !important;
    font-style: italic !important;
}

.cota-plan-logo {
    width: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.cota-plan-logo img {
    max-width: 100% !important;
    object-fit: contain !important;
}

/* Botão de confirmação dentro do card */
.cota-plan-confirm-btn {
    margin-top: 20px !important;
    padding-top: 20px !important;
    border-top: 1px dashed #e0e0e0 !important;
    animation: slideDownFade 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
    transform-origin: top !important;
}

.cota-btn-full {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
}

.cota-btn-full:hover {
    transform: translateY(-1px) !important;
}

@keyframes slideDownFade {
    0% {
        opacity: 0;
        transform: translateY(-15px) scaleY(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

.cota-error {
    background: #ffebee;
    color: #c62828;
    padding: 10px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    display: none;
}

.cota-loading {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    text-align: center !important;
    display: none !important;
    z-index: 10 !important;
}

.cota-loading p {
    margin-top: 15px !important;
    color: #666 !important;
    font-size: 14px !important;
}

.cota-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--cota-primary-color, #0073aa) !important;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cota-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 40px 20px;
    border-radius: 10px;
    margin-top: 30px;
    text-align: center;
    border: 2px solid #a5d6a7;
}

.cota-success h3 {
    font-size: 24px !important;
    margin: 0 0 15px 0 !important;
    color: #2e7d32 !important;
    font-weight: 700 !important;
}

.cota-success p {
    font-size: 16px !important;
    margin: 0 !important;
    line-height: 1.6 !important;
}

/* Estilos adicionais para formulários inline via shortcode */
.cota-smart-inline {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px 0;
}

/* Responsivo */
@media (max-width: 768px) {
    .cota-smart-container {
        margin: 30px auto;
        padding: 0px;
    }
    
    .cota-header {
        gap: 15px !important;
        padding: 0 30px !important;
    }
    
    .cota-header .cota-form-title {
        font-size: 20px !important;
    }
    
    .cota-header .cota-logo img {
        max-width: 150px !important;
    }
    
    .cota-smart-form {
        padding: 30px;
        border-radius: 0px;
    }
    
    .cota-age-groups {
        grid-template-columns: 1fr;
    }
    
    .cota-age-btn {
        width: 55px !important;
        height: 55px !important;
    }
    
    .cota-age-input {
        width: 80px !important;
        height: 55px !important;
    }
    
    .cota-buttons {
        flex-direction: column;
    }
    
    .cota-btn {
        width: 100% !important;
        height: 55px !important;
    }
    
    .cota-progress {
        margin: 0 0 30px 0 !important;
        max-width: 100%;
        gap: 10px;
    }
    
    .cota-progress .cota-step-circle {
        width: 30px;
        height: 30px;
        border-width: 2px;
    }
    
    .cota-progress .cota-step-circle .step-number {
        font-size: 12px;
    }
    
    .cota-progress .cota-step-line {
        height: 4px;
    }
    
    .cota-progress .cota-step-line::before {
        height: 4px;
    }
    
    .cota-progress .cota-step-line.half::before {
        width: 50% !important;
    }
    
    .cota-progress .cota-step-line.completed::before {
        width: 100% !important;
    }
    
    .cota-plan-content {
        align-items: flex-start !important;
    }
    
    .cota-plan-logo {
        width: 80px !important;
    }
    
    .cota-plan-name {
        font-size: 18px !important;
    }
    
    .cota-plan-price {
        font-size: 24px !important;
    }
    
    .cota-btn-full {
        font-size: 15px !important;
    }
    
    .cota-success {
        padding: 30px 20px;
    }
    
    .cota-success h3 {
        font-size: 20px !important;
    }
    
    .cota-success p {
        font-size: 15px !important;
    }
}

/* Toggle Atendimento Nacional */
.cota-toggle-nacional {
    margin-bottom: 25px;
}

.cota-toggle-wrapper {
    background: #F2F2F2;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.cota-toggle-wrapper:hover {
    background: #E8E8E8;
}

.cota-toggle-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cota-toggle-text {
    flex: 1;
}

.cota-toggle-text strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.cota-toggle-text p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Switch Toggle Moderno */
.cota-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    flex-shrink: 0;
}

.cota-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cota-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.cota-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.cota-switch input:checked + .cota-slider {
    background-color: var(--cota-primary-color, #0073aa);
}

.cota-switch input:focus + .cota-slider {
    box-shadow: 0 0 1px var(--cota-primary-color, #0073aa);
}

.cota-switch input:checked + .cota-slider:before {
    transform: translateX(26px);
}

/* Animação suave para campo de cidade quando desabilitado */
#cidade-field {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#cidade-field.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Estilos para o formulário com imagem de fundo */
.cota-smart-container.has-background-image {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .cota-smart-container.has-background-image {
        border-radius: 0px !important;
    }
}

.has-background-image .cota-header {
    padding: 30px 40px 0px 40px !important;
    margin-bottom: 0px !important;
}

.has-background-image .cota-smart-form {
    background: transparent !important;
}