/**
 * VERON Bearing Survey Styles v2.0
 * File: css/veron-survey.css
 * Redesign: Card-based layout, purple accent, inline results
 */

/* --- CSS Variables --- */
:root {
    --v-accent: #0066EB;
    --v-accent-light: #3385F0;
    --v-accent-bg: #EBF4FF;
    --v-accent-dark: #0052C2;
    --v-text: #1E293B;
    --v-text-light: #64748B;
    --v-text-muted: #94A3B8;
    --v-border: #E2E8F0;
    --v-bg: #F8FAFC;
    --v-white: #FFFFFF;
    --v-success: #10B981;
    --v-success-bg: #D1FAE5;
    --v-error: #EF4444;
    --v-error-bg: #FEE2E2;
    --v-radius: 12px;
    --v-radius-sm: 8px;
    --v-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --v-shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --v-shadow-lg: 0 10px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);
}

/* --- Reset for shortcode container --- */
#veronSurveyForm,
#veronSurveyForm * {
    box-sizing: border-box;
}
#veronSurveyForm {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--v-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Form Container --- */
.veron-survey-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* --- Section Title --- */
.veron-section-title {
    text-align: center;
    margin-bottom: 32px;
}
.veron-section-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--v-accent);
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.veron-section-title p {
    font-size: 14px;
    color: var(--v-text-light);
    margin: 0;
}

/* --- Parameter Grid (4 columns) --- */
.veron-params-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}
@media (max-width: 1024px) {
    .veron-params-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .veron-params-grid { grid-template-columns: 1fr; }
}

/* --- Field Group (Card) --- */
.veron-field-group {
    background: var(--v-white);
    border: 1.5px solid var(--v-border);
    border-radius: var(--v-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: border-color .2s, box-shadow .2s;
}
.veron-field-group:hover {
    border-color: var(--v-accent-light);
    box-shadow: var(--v-shadow-md);
}

/* Field Header */
.veron-field-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.veron-field-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--v-accent);
}
.veron-field-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}
.veron-field-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--v-accent);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.veron-field-label .required { color: var(--v-error); }

/* Field Description */
.veron-field-desc {
    font-size: 13px;
    color: var(--v-text-light);
    margin-bottom: 16px;
}

/* --- Number Input --- */
.veron-input-wrap {
    position: relative;
    margin-bottom: 8px;
}
.veron-input-wrap input[type="number"] {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 1.5px solid var(--v-border);
    border-radius: var(--v-radius-sm);
    font-size: 15px;
    color: var(--v-text);
    background: var(--v-white);
    transition: border-color .2s, box-shadow .2s;
    -moz-appearance: textfield;
}
.veron-input-wrap input[type="number"]::-webkit-outer-spin-button,
.veron-input-wrap input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.veron-input-wrap input[type="number"]:focus {
    outline: none;
    border-color: var(--v-accent);
    box-shadow: 0 0 0 3px rgba(0,102,235,.12);
    background: var(--v-white);
}
.veron-input-wrap .input-unit {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--v-text-muted);
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
}

/* --- Examples Box --- */
.veron-field-examples {
    background: var(--v-bg);
    border: 1px solid var(--v-border);
    border-radius: var(--v-radius-sm);
    padding: 12px 14px;
    margin-bottom: 8px;
}
.veron-field-examples .examples-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--v-text-light);
    margin-bottom: 6px;
    display: block;
}
.veron-field-examples ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.veron-field-examples li {
    font-size: 13px;
    color: var(--v-text);
    padding: 2px 0;
}
.veron-field-examples li::before {
    content: '•';
    color: var(--v-accent);
    font-weight: 700;
    margin-right: 8px;
}

/* Field Hint (bottom) */
.veron-field-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--v-text-muted);
    margin-top: auto;
}
.veron-field-hint svg {
    width: 14px;
    height: 14px;
    stroke: var(--v-accent);
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

/* --- Radio Cards (Beban) --- */
.veron-radio-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}
.veron-radio-card {
    position: relative;
    border: 1.5px solid var(--v-border);
    border-radius: var(--v-radius-sm);
    padding: 10px 12px;
    cursor: pointer;
    transition: all .2s;
    background: var(--v-white);
    display: flex;
    align-items: center;
    gap: 10px;
}
.veron-radio-card:hover {
    border-color: var(--v-accent-light);
    background: var(--v-accent-bg);
}
.veron-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.veron-radio-card.selected {
    border-color: var(--v-accent);
    background: var(--v-accent-bg);
    box-shadow: 0 0 0 2px rgba(0,102,235,.15);
}
.veron-radio-card .rc-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--v-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
}
.veron-radio-card.selected .rc-icon {
    border-color: var(--v-accent);
    background: var(--v-accent);
}
.veron-radio-card.selected .rc-icon::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}
.veron-radio-card .rc-text {
    display: flex;
    flex-direction: column;
}
.veron-radio-card .rc-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--v-text);
    line-height: 1.2;
}
.veron-radio-card .rc-sublabel {
    font-size: 11px;
    color: var(--v-text-muted);
}

/* --- Checkbox Cards (Kondisi Lingkungan) --- */
.veron-checkbox-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}
@media (max-width: 480px) {
    .veron-checkbox-cards { grid-template-columns: 1fr; }
}
.veron-checkbox-card {
    position: relative;
    border: 1.5px solid var(--v-border);
    border-radius: var(--v-radius-sm);
    padding: 10px 12px;
    cursor: pointer;
    transition: all .2s;
    background: var(--v-white);
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}
.veron-checkbox-card:hover {
    border-color: var(--v-accent-light);
    background: var(--v-accent-bg);
}
.veron-checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.veron-checkbox-card.selected {
    border-color: var(--v-accent);
    background: var(--v-accent-bg);
    box-shadow: 0 0 0 2px rgba(0,102,235,.15);
}
.veron-checkbox-card .cc-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--v-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
    font-size: 11px;
    color: transparent;
}
.veron-checkbox-card.selected .cc-icon {
    border-color: var(--v-accent);
    background: var(--v-accent);
    color: #fff;
}
.veron-checkbox-card .cc-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--v-text);
    line-height: 1.2;
}
.veron-checkbox-card .cc-sublabel {
    font-size: 11px;
    color: var(--v-text-muted);
}

/* --- Contact Section --- */
#veronSurveyForm .veron-contact-section {
    background: var(--v-white);
    border: 1.5px solid var(--v-border);
    border-radius: var(--v-radius);
    padding: 24px;
    margin-bottom: 24px;
    overflow: hidden;
    box-sizing: border-box;
}
.veron-contact-section .veron-section-title {
    text-align: left;
    margin-bottom: 16px;
}
.veron-contact-section .veron-section-title h2 {
    font-size: 14px;
    color: var(--v-accent);
}
.veron-contact-section .veron-section-title p {
    font-size: 12px;
    color: var(--v-text-muted);
}
#veronSurveyForm .veron-contact-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 16px;
}
@media (max-width: 768px) {
    #veronSurveyForm .veron-contact-row { grid-template-columns: 1fr !important; }
}
#veronSurveyForm .veron-contact-field {
    min-width: 0;
    overflow: hidden;
}
#veronSurveyForm .veron-contact-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--v-text-light);
    margin-bottom: 6px;
}
#veronSurveyForm .veron-contact-field input,
#veronSurveyForm .veron-contact-field select {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 14px;
    border: 1.5px solid var(--v-border);
    border-radius: var(--v-radius-sm);
    font-size: 14px;
    color: var(--v-text);
    background: var(--v-bg);
    transition: border-color .2s, box-shadow .2s;
}
.veron-contact-field input:focus,
.veron-contact-field select:focus {
    outline: none;
    border-color: var(--v-accent);
    box-shadow: 0 0 0 3px rgba(0,102,235,.12);
    background: var(--v-white);
}
.veron-contact-field input::placeholder {
    color: var(--v-text-muted);
}

/* Phone input with prefix */
#veronSurveyForm .veron-phone-wrap {
    display: flex !important;
    gap: 0;
    width: 100% !important;
}
#veronSurveyForm .veron-phone-prefix {
    padding: 10px 12px;
    border: 1.5px solid var(--v-border);
    border-right: none;
    border-radius: var(--v-radius-sm) 0 0 var(--v-radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--v-text);
    background: var(--v-bg);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    cursor: default;
    white-space: nowrap;
}
#veronSurveyForm .veron-phone-wrap input {
    border-radius: 0 var(--v-radius-sm) var(--v-radius-sm) 0 !important;
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
}

/* --- Submit Button --- */
.veron-submit-wrap {
    text-align: center;
    margin-bottom: 36px;
}
.veron-btn-analyze {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 48px;
    background: #0066EB !important;
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: var(--v-radius);
    cursor: pointer;
    transition: all .25s;
    min-width: 280px;
}
.veron-btn-analyze svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}
.veron-btn-analyze:hover {
    background: #0052C2 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,102,235,.35);
}
.veron-btn-analyze:disabled {
    background: #94A3B8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Result Section (Inline) --- */
.veron-result-section {
    background: var(--v-white);
    border: 1.5px solid var(--v-border);
    border-radius: var(--v-radius);
    padding: 32px;
    text-align: center;
}
.veron-result-section .veron-section-title {
    margin-bottom: 0;
}
.veron-result-section .veron-section-title h2 {
    font-size: 14px;
    color: var(--v-accent);
    margin-bottom: 24px;
}

/* Empty State */
.veron-empty-state {
    padding: 20px 0;
}
.veron-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: var(--v-accent-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.veron-empty-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--v-accent);
    fill: none;
    stroke-width: 1.5;
}
.veron-empty-state h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--v-text);
    margin: 0 0 8px;
}
.veron-empty-state p {
    font-size: 13px;
    color: var(--v-text-light);
    margin: 0 0 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Benefit Badges */
.veron-benefits {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 20px 0;
    border-top: 1px solid var(--v-border);
    border-bottom: 1px solid var(--v-border);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.veron-benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.veron-benefit-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--v-accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.veron-benefit-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--v-accent);
    fill: none;
    stroke-width: 2;
}
.veron-benefit-text strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--v-text);
}
.veron-benefit-text span {
    font-size: 11px;
    color: var(--v-text-muted);
}

/* Disclaimer */
.veron-disclaimer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--v-text-muted);
    padding-top: 16px;
}
.veron-disclaimer svg {
    width: 16px;
    height: 16px;
    stroke: var(--v-text-muted);
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

/* --- Result Content (when analysis is done) --- */
.veron-result-product {
    background: linear-gradient(135deg, var(--v-accent-bg), #F0F7FF);
    border: 2px solid var(--v-accent);
    border-radius: var(--v-radius);
    padding: 28px;
    margin-bottom: 28px;
}
.veron-result-product .rp-badge {
    display: inline-block;
    background: var(--v-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.veron-result-product .rp-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--v-text);
    margin-bottom: 4px;
}
.veron-result-product .rp-grade {
    font-size: 14px;
    color: var(--v-text-light);
}

.veron-result-summary {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    text-align: left;
}
.veron-result-summary td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--v-border);
    font-size: 14px;
}
.veron-result-summary td:first-child {
    color: var(--v-text-light);
    width: 45%;
}
.veron-result-summary td:last-child {
    color: var(--v-text);
    font-weight: 600;
}

.veron-result-reasons {
    text-align: left;
    margin-bottom: 24px;
}
.veron-result-reasons h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--v-text);
    margin-bottom: 10px;
}
.veron-result-reasons ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.veron-result-reasons li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--v-text);
    padding: 6px 0;
}
.veron-result-reasons .reason-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--v-success-bg);
    color: var(--v-success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Result CTA */
.veron-result-cta {
    text-align: center;
    padding-top: 8px;
}
.veron-btn-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: #25D366;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--v-radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
}
.veron-btn-wa:hover {
    background: #20bd5a;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,211,102,.35);
}
.veron-btn-wa svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* --- Error States --- */
.veron-field-group.has-error .veron-input-wrap input,
.veron-field-group.has-error .veron-phone-wrap input {
    border-color: var(--v-error);
}
.veron-field-group.has-error .veron-radio-cards,
.veron-field-group.has-error .veron-checkbox-cards {
    outline: 2px solid var(--v-error);
    border-radius: var(--v-radius-sm);
}
.veron-field-group .field-error {
    font-size: 12px;
    color: var(--v-error);
    margin-top: 4px;
    display: none;
}
.veron-field-group.has-error .field-error {
    display: block;
}

/* --- Scroll to result animation --- */
.veron-result-section.has-results {
    animation: veronFadeIn .4s ease;
}
@keyframes veronFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}