/* ============================================
   Marcel Security - Correios Envios
   Formulário Público (Cliente)
   ============================================ */

.msc-form-container {
    max-width: 680px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1a1a1a;
}

/* Header */
.msc-form-header {
    text-align: center;
    padding: 30px 20px 20px;
    background: #000;
    border-radius: 12px 12px 0 0;
    color: #fff;
}

.msc-form-logo {
    max-width: 220px;
    height: auto;
    margin-bottom: 15px;
}

.msc-form-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
}

.msc-form-header p {
    font-size: 14px;
    color: #ccc;
    margin: 0;
}

/* Form */
.msc-form {
    background: #fff;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.msc-form-section {
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.msc-form-section:last-of-type {
    border-bottom: none;
}

.msc-form-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 18px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.msc-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Toggle CPF/CNPJ */
.msc-tipo-doc-toggle {
    display: flex;
    gap: 0;
    border: 1.5px solid #d0d5dd;
    border-radius: 8px;
    overflow: hidden;
    max-width: 260px;
}

.msc-toggle-option {
    flex: 1;
    text-align: center;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    background: #f8f8f8;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 !important;
    border: none;
    user-select: none;
}

.msc-toggle-option input[type="radio"] {
    display: none;
}

.msc-toggle-option:first-child {
    border-right: 1.5px solid #d0d5dd;
}

.msc-toggle-option.msc-toggle-active {
    background: #000;
    color: #fff;
}

.msc-toggle-option:hover:not(.msc-toggle-active) {
    background: #eee;
}

/* Fields */
.msc-field {
    margin-bottom: 16px;
}

.msc-field:last-child {
    margin-bottom: 0;
}

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

.msc-required {
    color: #e53e3e;
}

.msc-field input[type="text"],
.msc-field input[type="email"],
.msc-field select,
.msc-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d0d5dd;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.msc-field input:focus,
.msc-field select:focus,
.msc-field textarea:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

.msc-field input::placeholder,
.msc-field textarea::placeholder {
    color: #aaa;
}

.msc-field small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #888;
}

.msc-field small a {
    color: #555;
    text-decoration: underline;
}

/* Field rows */
.msc-field-row {
    display: flex;
    gap: 15px;
    margin-bottom: 16px;
}

.msc-field-row .msc-field {
    flex: 1;
    margin-bottom: 0;
}

.msc-field-row .msc-field-small {
    flex: 0 0 120px;
}

/* CEP wrapper */
.msc-cep-wrapper {
    display: flex;
    gap: 8px;
}

.msc-cep-wrapper input {
    flex: 1;
}

.msc-btn-cep {
    padding: 10px 18px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.msc-btn-cep:hover {
    background: #333;
}

#msc-cep-loading {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Erro */
.msc-erro {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 6px;
}

/* Submit */
.msc-form-submit {
    padding: 20px 30px 30px;
    text-align: center;
}

.msc-btn-primary {
    display: inline-block;
    padding: 14px 50px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}

.msc-btn-primary:hover {
    background: #222;
    transform: translateY(-1px);
}

.msc-btn-primary:active {
    transform: translateY(0);
}

.msc-btn-primary:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
}

#msc-form-loading {
    font-size: 14px;
    color: #666;
    margin-top: 12px;
    font-style: italic;
}

/* Tela de sucesso */
.msc-sucesso {
    text-align: center;
    padding: 50px 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.msc-sucesso-icon {
    width: 70px;
    height: 70px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 20px;
}

.msc-sucesso h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px;
}

.msc-sucesso p {
    font-size: 15px;
    color: #555;
    margin: 0 0 8px;
}

.msc-pedido-numero {
    font-size: 36px;
    font-weight: 800;
    color: #000;
    margin: 15px 0 20px;
    letter-spacing: 2px;
}

/* Botão WhatsApp */
.msc-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    background: #25d366;
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.1s;
    margin-top: 10px;
}

.msc-btn-whatsapp:hover {
    background: #1fb855;
    transform: translateY(-1px);
    color: #fff !important;
}

.msc-btn-whatsapp:visited {
    color: #fff !important;
}

/* Responsivo */
@media (max-width: 600px) {
    .msc-form-container {
        margin: 15px 10px;
    }

    .msc-form-section {
        padding: 20px 18px;
    }

    .msc-field-row {
        flex-direction: column;
        gap: 0;
    }

    .msc-field-row .msc-field {
        margin-bottom: 16px;
    }

    .msc-field-row .msc-field-small {
        flex: 1;
    }

    .msc-form-submit {
        padding: 15px 18px 25px;
    }

    .msc-btn-primary {
        width: 100%;
        padding: 14px 20px;
    }

    .msc-btn-whatsapp {
        width: 100%;
    }

    .msc-form-logo {
        max-width: 180px;
    }

    .msc-pedido-numero {
        font-size: 28px;
    }
}
