/**
 * CRM Developer - Public Styles
 */

/* Form Wrapper */
.crm-public-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.crm-public-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.crm-public-form-header h2 {
    font-size: 28px;
    color: #333;
    margin: 0 0 10px;
}

.crm-public-form-header p {
    color: #666;
    margin: 0;
}

/* Steps Indicator */
.crm-public-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0;
    position: relative;
}

.crm-public-steps::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.crm-public-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 0 10px;
}

.crm-public-steps .step span:first-child {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.crm-public-steps .step.active span:first-child {
    background: #059669;
    color: #fff;
}

.crm-public-steps .step.completed span:first-child {
    background: #27ae60;
    color: #fff;
}

/* Form */
.crm-public-form {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 30px;
}

.form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-step.active {
    display: block;
}

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

.form-step h3 {
    font-size: 20px;
    color: #333;
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.step-intro {
    color: #666;
    margin: -10px 0 20px;
    font-size: 14px;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.field-hint {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.required {
    color: #e74c3c;
}

/* Radio and Checkboxes */
.radio-inline {
    display: flex;
    gap: 20px;
}

.radio-inline label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-item:hover {
    border-color: #059669;
    background: #f8f9ff;
}

.checkbox-item input:checked + span {
    color: #059669;
    font-weight: 500;
}

/* Interest Options */
.interest-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.interest-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.interest-option:hover {
    border-color: #059669;
}

.interest-option input {
    display: none;
}

.interest-option input:checked + .interest-icon {
    background: #059669;
}

.interest-icon {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.2s;
}

/* LGPD Consent */
.lgpd-consent {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 25px;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.consent-label input {
    margin-top: 3px;
    flex-shrink: 0;
}

/* Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #059669;
    color: #fff;
}

.btn-primary:hover {
    background: #047857;
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.btn-success {
    background: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background: #219a52;
}

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

/* Success Message */
.crm-public-success {
    text-align: center;
    padding: 50px 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #d4edda;
    color: #27ae60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
}

.crm-public-success h3 {
    font-size: 24px;
    color: #27ae60;
    margin: 0 0 10px;
}

.crm-public-success p {
    color: #666;
    margin: 0;
}

/* Public Dashboard */
.crm-public-dashboard {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.dashboard-header h2 {
    font-size: 28px;
    color: #333;
    margin: 0 0 10px;
}

.dashboard-header p {
    color: #666;
    margin: 0;
}

.dashboard-stats {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    color: #fff;
    padding: 30px 50px;
    border-radius: 16px;
    text-align: center;
}

.stat-card.main .stat-number {
    font-size: 48px;
    font-weight: 700;
    display: block;
}

.stat-card .stat-label {
    font-size: 16px;
    opacity: 0.9;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.dashboard-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.dashboard-card h3 {
    font-size: 16px;
    color: #333;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.state-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.state-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.state-name {
    width: 30px;
    font-size: 13px;
    font-weight: 500;
}

.state-bar {
    flex: 1;
    height: 24px;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
}

.state-bar .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #059669, #0d9488);
    border-radius: 12px;
}

.state-value {
    width: 40px;
    text-align: right;
    font-size: 13px;
    color: #666;
}

.dashboard-footer {
    text-align: center;
    margin-top: 30px;
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .crm-public-form-wrapper,
    .crm-public-dashboard {
        padding: 15px;
    }

    .crm-public-steps {
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .crm-public-steps::before {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .interest-options {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
    }
}
