/* Botão Flutuante */
#cnn-float-btn {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 99998;
    background: linear-gradient(135deg, #ffc03d 0%, #f8b526 100%);
    color: #212d45;
    border: none;
    border-radius: 50px;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(248, 181, 38, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#cnn-float-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(248, 181, 38, 0.55);
}
#cnn-float-btn svg {
    flex-shrink: 0;
}

/* Modal Overlay */
#cnn-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(33, 45, 69, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
#cnn-modal-overlay.active {
    display: flex;
}

/* Modal */
#cnn-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: cnnSlideUp 0.3s ease;
}
@keyframes cnnSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
#cnn-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}
#cnn-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}
#cnn-modal-title {
    font-family: 'Sora', sans-serif;
    color: #212d45;
    font-size: 22px;
    margin: 0 0 24px 0;
    font-weight: 700;
}

/* Progress Steps */
#cnn-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    gap: 0;
}
.cnn-step {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    transition: all 0.3s;
}
.cnn-step.active {
    background: #ffc03d;
    color: #212d45;
}
.cnn-step.done {
    background: #212d45;
    color: #fff;
}
.cnn-step-line {
    width: 40px;
    height: 3px;
    background: #e8e8e8;
    margin: 0 4px;
    border-radius: 2px;
    transition: background 0.3s;
}
.cnn-step-line.done {
    background: #212d45;
}

/* Form Elements */
.cnn-form-step label {
    display: block;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #212d45;
    margin-bottom: 8px;
}
.cnn-form-step select,
.cnn-form-step input[type="date"],
.cnn-form-step input[type="text"],
.cnn-form-step input[type="tel"],
.cnn-form-step input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Sora', sans-serif;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.cnn-form-step select:focus,
.cnn-form-step input:focus {
    outline: none;
    border-color: #ffc03d;
    background: #fff;
}

/* Options Grid (Especialidades) */
.cnn-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}
.cnn-option-card {
    padding: 14px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #4b4f58;
    transition: all 0.2s;
    background: #fff;
}
.cnn-option-card:hover {
    border-color: #ffc03d;
    background: #fffbf0;
}
.cnn-option-card.selected {
    border-color: #ffc03d;
    background: #ffc03d;
    color: #212d45;
}

/* Horários Grid */
.cnn-horarios-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}
.cnn-horario-btn {
    padding: 10px 8px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #4b4f58;
    background: #fff;
    transition: all 0.2s;
}
.cnn-horario-btn:hover {
    border-color: #ffc03d;
}
.cnn-horario-btn.selected {
    border-color: #ffc03d;
    background: #ffc03d;
    color: #212d45;
}
.cnn-hint {
    grid-column: 1 / -1;
    color: #999;
    font-size: 13px;
    text-align: center;
    font-style: italic;
}

/* Loading */
.cnn-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    padding: 30px;
    font-size: 14px;
}
.cnn-loading::after {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    border: 3px solid #e8e8e8;
    border-top-color: #ffc03d;
    border-radius: 50%;
    margin: 12px auto 0;
    animation: cnnSpin 0.8s linear infinite;
}
@keyframes cnnSpin {
    to { transform: rotate(360deg); }
}

/* Navigation */
#cnn-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}
#cnn-prev, #cnn-next {
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
#cnn-prev {
    background: #f0f0f0;
    color: #666;
}
#cnn-prev:hover {
    background: #e0e0e0;
}
#cnn-next {
    background: linear-gradient(135deg, #ffc03d 0%, #f8b526 100%);
    color: #212d45;
    margin-left: auto;
}
#cnn-next:hover:not(:disabled) {
    box-shadow: 0 4px 15px rgba(248, 181, 38, 0.4);
    transform: translateY(-1px);
}
#cnn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Resumo */
#cnn-resumo {
    background: #f8f9fb;
    border-radius: 12px;
    padding: 20px;
}
#cnn-resumo h4 {
    margin: 0 0 16px;
    color: #212d45;
    font-family: 'Sora', sans-serif;
}
#cnn-resumo .cnn-resumo-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
    font-size: 14px;
}
#cnn-resumo .cnn-resumo-item:last-child {
    border-bottom: none;
}
#cnn-resumo .cnn-resumo-label {
    color: #999;
    font-weight: 500;
}
#cnn-resumo .cnn-resumo-value {
    color: #212d45;
    font-weight: 600;
    text-align: right;
}

/* Success */
.cnn-success-icon {
    width: 64px;
    height: 64px;
    background: #27ae60;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}
#cnn-success h3 {
    text-align: center;
    color: #212d45;
    font-family: 'Sora', sans-serif;
    margin-bottom: 8px;
}
#cnn-success p {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Error message */
.cnn-error {
    background: #fff3f3;
    color: #c0392b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
    #cnn-float-btn span {
        display: none;
    }
    #cnn-float-btn {
        padding: 14px;
        border-radius: 50%;
        width: 56px;
        height: 56px;
        justify-content: center;
    }
    #cnn-modal {
        padding: 24px 20px;
        border-radius: 12px;
    }
    .cnn-options-grid {
        grid-template-columns: 1fr;
    }
    .cnn-horarios-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
