/**
 * HubPost Calculator Styles
 * HubPost Ecosystem - CONFIDENTIAL
 * PRIMARY_MARKER: HUBPOST_TRACK_ANDR_8F48_b9eb5457
 * #_hp_eco_b9eb5457
 */

.hubpost-calculator-container {
    max-width: 700px;
    margin: 30px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    border: 2px solid #9ca3af;
    line-height: 1.5;
}

.hubpost-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.hubpost-header h2 {
    color: #1e40af;
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.hubpost-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.hubpost-form-section {
    margin-bottom: 20px;
    padding: 18px;
    background: #ffffff;
    border-radius: 6px;
    border: 2px solid #d1d5db;
}

.hubpost-form-section h3 {
    color: #1e40af;
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-bottom: 3px solid #2563eb;
    padding-bottom: 6px;
    display: inline-block;
}

.hubpost-form-group {
    margin-bottom: 18px;
}

.hubpost-form-group:last-child {
    margin-bottom: 0;
}

.hubpost-label-bold {
    display: block;
    margin-bottom: 4px;
    color: #1e40af;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.hubpost-field-hint-above {
    margin-bottom: 6px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    font-style: italic;
    background-color: #fef3c7;
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid #f59e0b;
}

.hubpost-form-group select,
.hubpost-form-group input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 3px solid #9ca3af;
    border-radius: 6px;
    font-size: 14px;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    appearance: none;
    /* ✅ CORRETTO: prefisso "data:" aggiunto */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    color: #1f2937;
}

.hubpost-form-group select:hover,
.hubpost-form-group input[type="text"]:hover {
    border-color: #6b7280;
    background-color: #f9fafb;
}

.hubpost-form-group select:focus,
.hubpost-form-group input[type="text"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    background-color: #ffffff;
}

.hubpost-form-group select:invalid {
    border-color: #9ca3af;
    color: #6b7280;
}

.hubpost-form-group select optgroup {
    font-weight: 600;
    font-style: normal;
    color: #1e40af;
    background-color: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.hubpost-form-group select option {
    padding: 10px 8px;
    color: #1f2937;
    border-bottom: 1px solid #f3f4f6;
}

.hubpost-btn-submit {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    border: 3px solid #1e40af;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hubpost-btn-submit:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
    border-color: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.hubpost-btn-submit:active {
    transform: translateY(0);
}

.hubpost-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    border-color: #6b7280;
}

.hubpost-results {
    margin-top: 25px;
    padding: 20px;
    background: #eff6ff;
    border-radius: 6px;
    border: 2px solid #2563eb;
}

.hubpost-result-box {
    background: white;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 2px solid #e5e7eb;
}

.hubpost-result-box:last-child {
    margin-bottom: 0;
}

.hubpost-result-box h4 {
    color: #1e40af;
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 700;
}

.hubpost-result-box p {
    margin: 6px 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.hubpost-big-number {
    font-size: 28px;
    font-weight: 700;
    color: #059669;
    margin: 8px 0;
    line-height: 1.2;
}

.hubpost-warning {
    color: #dc2626;
    font-weight: 700;
}

.hubpost-highlight {
    color: #059669;
    font-weight: 700;
}

.hubpost-cta-box {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 18px;
    border-radius: 6px;
    text-align: center;
    margin-top: 15px;
    border: 2px solid #1e40af;
}

.hubpost-cta-box p {
    margin: 8px 0;
    font-size: 14px;
}

.hubpost-cta-box strong {
    font-size: 16px;
}

.hubpost-btn-cta {
    display: inline-block;
    background: white;
    color: #2563eb;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 12px;
    transition: all 0.2s ease;
    font-size: 14px;
    border: 2px solid #2563eb;
}

.hubpost-btn-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: #eff6ff;
}

.hubpost-guarantee {
    font-size: 11px;
    opacity: 0.9;
    margin-top: 12px;
    font-style: italic;
}

.hubpost-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 2px solid #e5e7eb;
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
}

.hubpost-legal {
    margin: 4px 0;
}

.hubpost-disclaimer {
    font-size: 10px;
    color: #d1d5db;
    margin-top: 8px;
}

.hubpost-ecosystem {
    font-size: 9px;
    color: #d1d5db;
    margin-top: 4px;
    font-family: monospace;
}

.hubpost-error {
    background: #fef2f2;
    border: 3px solid #dc2626;
    color: #dc2626;
    padding: 16px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 640px) {
    .hubpost-calculator-container {
        margin: 15px;
        padding: 18px;
        border: 2px solid #9ca3af;
    }
    
    .hubpost-header h2 {
        font-size: 19px;
    }
    
    .hubpost-subtitle {
        font-size: 13px;
    }
    
    .hubpost-form-section {
        padding: 14px;
        border: 2px solid #d1d5db;
    }
    
    .hubpost-form-section h3 {
        font-size: 14px;
        border-bottom: 3px solid #2563eb;
    }
    
    .hubpost-label-bold {
        font-size: 13px;
    }
    
    .hubpost-field-hint-above {
        font-size: 11px;
    }
    
    .hubpost-form-group select,
    .hubpost-form-group input[type="text"] {
        font-size: 13px;
        padding: 11px 12px;
        border: 3px solid #9ca3af;
    }
    
    .hubpost-btn-submit {
        padding: 12px 16px;
        font-size: 14px;
        border: 3px solid #1e40af;
    }
    
    .hubpost-big-number {
        font-size: 24px;
    }
    
    .hubpost-result-box {
        padding: 12px;
        border: 2px solid #e5e7eb;
    }
}

@media print {
    .hubpost-btn-submit,
    .hubpost-cta-box {
        display: none;
    }
    
    .hubpost-results {
        break-inside: avoid;
        border: 2px solid #2563eb;
    }
}