@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.whatsapp-container {
    width: 100%;
    max-width: 580px;
    margin: 30px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.whatsapp-header {
    background: linear-gradient(135deg, #075E54 0%, #128C7E 40%, #25D366 100%);
    padding: 28px 32px 24px;
    text-align: center;
    position: relative;
}

.whatsapp-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 24px;
    background: #ffffff;
    border-radius: 24px 24px 0 0;
}

.whatsapp-header-icon {
    font-size: 42px;
    margin-bottom: 8px;
    display: block;
}

.whatsapp-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.whatsapp-header p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 400;
}

.whatsapp-body {
    padding: 20px 32px 32px;
}

.whatsapp-body .form-group {
    margin-bottom: 18px;
}

.whatsapp-body label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 0.2px;
}

.whatsapp-body label .label-icon {
    font-size: 15px;
}

.whatsapp-body select,
.whatsapp-body input,
.whatsapp-body textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #1a1a1a;
    transition: all 0.25s ease;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.whatsapp-body select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.whatsapp-body select:focus,
.whatsapp-body input:focus,
.whatsapp-body textarea:focus {
    border-color: #25D366;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.12);
}

.whatsapp-body textarea {
    min-height: 80px;
    resize: vertical;
}

.whatsapp-body .error-message {
    display: none;
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
    align-items: center;
    gap: 4px;
}

.whatsapp-body .error-message.visible {
    display: flex;
}

.whatsapp-body .submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.whatsapp-body .submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.whatsapp-body .submit-btn:active {
    transform: translateY(0);
}

.whatsapp-body .submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.whatsapp-body .submit-btn.loading .btn-text {
    display: none;
}

.whatsapp-body .submit-btn.loading .btn-spinner {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.whatsapp-body .resultado {
    margin-top: 24px;
    display: none;
    animation: fadeSlideUp 0.4s ease;
}

.whatsapp-body .resultado.visible {
    display: block;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resultado .result-card {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 16px;
}

.resultado .result-card + .result-card {
    margin-top: 12px;
}

.resultado .result-label {
    font-size: 12px;
    font-weight: 600;
    color: #166534;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.resultado .result-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.resultado .result-content .result-text {
    flex: 1;
    background: #ffffff;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #1a1a1a;
    word-break: break-all;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    line-height: 1.5;
    max-height: 60px;
    overflow-y: auto;
}

.result-content .copy-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    background: #25D366;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.result-content .copy-btn:hover {
    background: #1da952;
    transform: translateY(-1px);
}

.result-content .copy-btn:active {
    transform: translateY(0);
}

.result-content .copy-btn.copied {
    background: #16a34a;
}

.whatsapp-container .toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1a1a1a;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.35s ease;
    z-index: 99999;
    pointer-events: none;
}

.whatsapp-container .toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.whatsapp-container .toast.toast-success {
    background: #16a34a;
}

.whatsapp-container .toast.toast-error {
    background: #dc2626;
}

@media (max-width: 640px) {
    .whatsapp-body {
        padding: 16px 20px 24px;
    }

    .whatsapp-header {
        padding: 22px 20px 18px;
    }

    .whatsapp-header h2 {
        font-size: 19px;
    }

    .resultado .result-content {
        flex-direction: column;
        align-items: stretch;
    }

    .result-content .copy-btn {
        justify-content: center;
    }
}
