/* AI Quick Quote Widget Styles */
.ai-quick-quote-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Trigger Button */
.ai-quote-trigger {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-radius: 16px;
    padding: 16px 20px;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.ai-quote-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.4);
}

.ai-quote-trigger.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.ai-trigger-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.ai-trigger-icon {
    font-size: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.ai-trigger-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ai-trigger-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
}

.ai-trigger-subtitle {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.2;
}

/* Quote Panel */
.ai-quote-panel {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 420px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: calc(100vh - 40px);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.ai-quote-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.ai-quote-header {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.ai-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-header-icon {
    font-size: 24px;
}

.ai-header-text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.ai-header-text p {
    margin: 4px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.2;
}

.ai-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ai-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Content */
.ai-quote-content {
    padding: 24px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

/* Form */
.ai-quote-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ai-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ai-form-group label {
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.ai-form-group input,
.ai-form-group textarea {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    transition: border-color 0.2s;
    resize: none;
    font-family: inherit;
}

.ai-form-group input:focus,
.ai-form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.ai-form-group textarea {
    min-height: 100px;
    line-height: 1.5;
}

.ai-char-counter {
    text-align: right;
    font-size: 12px;
    color: #64748b;
}

.ai-generate-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-top: 8px;
}

.ai-generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.ai-generate-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ai-btn-icon {
    font-size: 18px;
}

.ai-disclaimer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-top: 8px;
}

.ai-disclaimer p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

/* Loading */
.ai-quote-loading {
    text-align: center;
    padding: 40px 20px;
}

.ai-loading-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.ai-loading-brain {
    font-size: 32px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.ai-loading-dots {
    display: flex;
    gap: 4px;
}

.ai-loading-dots span {
    width: 8px;
    height: 8px;
    background: #2563eb;
    border-radius: 50%;
    animation: wave 1.4s infinite;
}

.ai-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes wave {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
}

.ai-loading-text p {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 20px 0;
}

.ai-loading-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.ai-step {
    padding: 12px 16px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-step.active {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
}

.ai-step.completed {
    background: #dcfce7;
    color: #166534;
}

/* Result */
.ai-result-header {
    text-align: center;
    margin-bottom: 24px;
}

.ai-result-header.ai-fallback {
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    background: #fef3c7;
}

.ai-result-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.ai-result-header h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.ai-result-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.ai-result-summary {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.ai-summary-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
}

.ai-summary-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ai-summary-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.ai-summary-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ai-solution-item {
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
}

.ai-more-solutions {
    font-size: 13px;
    color: #64748b;
    font-style: italic;
}

.ai-result-next-steps {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.ai-result-next-steps h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #0c4a6e;
}

.ai-next-step {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ai-next-step:last-child {
    margin-bottom: 0;
}

.ai-step-number {
    background: #0ea5e9;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-step-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
}

.ai-result-disclaimer {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.ai-result-disclaimer p {
    margin: 0;
    font-size: 13px;
    color: #92400e;
    line-height: 1.4;
}

.ai-result-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.ai-new-quote-btn {
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.ai-new-quote-btn:hover {
    background: #4b5563;
}

.ai-fallback-message {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.ai-fallback-message p {
    margin: 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

/* Error Message */
.ai-error-message {
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease-out;
}

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

.ai-error-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-error-icon {
    font-size: 16px;
}

.ai-error-text {
    font-size: 14px;
    color: #dc2626;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-quick-quote-widget {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    .ai-quote-trigger {
        width: 100%;
        justify-content: center;
    }

    .ai-quote-panel {
        width: 100%;
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
    }

    .ai-form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ai-quote-content {
        padding: 20px;
        max-height: calc(90vh - 120px);
    }

    .ai-trigger-content {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ai-quote-content {
        padding: 16px;
    }

    .ai-quote-header {
        padding: 16px;
    }

    .ai-header-text h3 {
        font-size: 16px;
    }

    .ai-header-text p {
        font-size: 13px;
    }
}
/* Sector Chips Styles */
.ai-sector-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.ai-sector-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(37, 99, 235, 0.1);
    border: 2px solid rgba(37, 99, 235, 0.2);
    border-radius: 20px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-sector-chip:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.4);
}

.ai-sector-chip.active {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    border-color: transparent;
    color: white;
}

.ai-sector-chip i {
    font-size: 14px;
}

/* Sector Questions */
.ai-sector-questions {
    background: rgba(37, 99, 235, 0.05);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.ai-sector-questions .ai-form-group {
    margin-bottom: 12px;
}

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

.ai-sector-questions select,
.ai-sector-questions input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.ai-sector-questions select:focus,
.ai-sector-questions input[type="number"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Multiselect Checkboxes */
.ai-multiselect {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.ai-checkbox-label:hover {
    border-color: #2563eb;
}

.ai-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.ai-checkbox-label input[type="checkbox"]:checked + span {
    color: #2563eb;
    font-weight: 500;
}
