/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Salesforce Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f6f9;
    color: #181818;
    line-height: 1.5;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-icon {
    font-size: 48px;
    opacity: 0.9;
}

.header-content h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.header-content p {
    font-size: 14px;
    opacity: 0.9;
}

/* Form Container */
.form-container {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* Form Sections */
.form-section {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #181818;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h3 i {
    color: #0176d3;
    font-size: 18px;
}

/* Form Groups */
.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #181818;
    margin-bottom: 6px;
    font-size: 14px;
}

/* Form Controls */
input[type="text"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d8dde6;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #0176d3;
    box-shadow: 0 0 0 2px rgba(1, 118, 211, 0.1);
}

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

select {
    cursor: pointer;
}

/* Help Text */
.help-text {
    display: block;
    font-size: 12px;
    color: #706e6b;
    margin-top: 4px;
    line-height: 1.4;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #0176d3;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: #014486;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(1, 118, 211, 0.3);
}

.btn-secondary {
    background-color: #ffffff;
    color: #0176d3;
    border: 1px solid #0176d3;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #f4f6f9;
    transform: translateY(-1px);
}

/* Button Group */
.button-group {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Footer */
.footer {
    background-color: #f4f6f9;
    padding: 20px 24px;
    border-top: 1px solid #e5e5e5;
}

/* WhatsApp Preview */
.preview-container {
    background-color: #f0f2f5;
    padding: 20px;
    border-radius: 8px;
}

.whatsapp-preview {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 300px;
}

.whatsapp-header {
    background-color: #25D366;
    color: white;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-message {
    padding: 16px;
    background-color: #dcf8c6;
    margin: 8px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
}

.whatsapp-message:before {
    content: '';
    position: absolute;
    top: 0;
    right: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid #dcf8c6;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    background-color: white;
    padding: 32px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.loading-spinner i {
    font-size: 32px;
    color: #0176d3;
    margin-bottom: 16px;
}

.loading-spinner p {
    font-size: 14px;
    color: #706e6b;
    margin: 0;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.toast {
    background-color: #ffffff;
    border-left: 4px solid #0176d3;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    margin-bottom: 12px;
    min-width: 300px;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    border-left-color: #04844b;
}

.toast.error {
    border-left-color: #c23934;
}

.toast.warning {
    border-left-color: #ffb75d;
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-header i {
    font-size: 16px;
}

.toast.success .toast-header i {
    color: #04844b;
}

.toast.error .toast-header i {
    color: #c23934;
}

.toast.warning .toast-header i {
    color: #ffb75d;
}

.toast-message {
    font-size: 14px;
    color: #706e6b;
    line-height: 1.4;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #706e6b;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
    }
    
    .header {
        padding: 16px;
    }
    
    .header-content h1 {
        font-size: 20px;
    }
    
    .form-container {
        padding: 16px;
    }
    
    .form-section {
        padding: 16px;
    }
    
    .footer {
        padding: 16px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .toast {
        min-width: auto;
        max-width: calc(100vw - 40px);
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .btn {
        display: none;
    }
    
    .container {
        box-shadow: none;
        border: none;
    }
    
    .form-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}