/**
 * Easy Care AI Helper - Frontend Styles
 * Uses Elementor global tokens where possible
 */

.easycare-ai-helper {
    background: var(--e-global-color-background, #ffffff);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    font-family: var(--e-global-typography-text-font-family, inherit);
}

.easycare-ai-helper--compact {
    padding: 1.25rem;
}

/* Header */
.easycare-ai-helper__header {
    margin-bottom: 1.5rem;
}

.easycare-ai-helper--compact .easycare-ai-helper__header {
    margin-bottom: 1rem;
}

.easycare-ai-helper__title {
    font-size: var(--e-global-typography-primary-font-size, 1.75rem);
    font-weight: var(--e-global-typography-primary-font-weight, 600);
    color: var(--e-global-color-primary, #000000);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.easycare-ai-helper--compact .easycare-ai-helper__title {
    font-size: 1.5rem;
}

.easycare-ai-helper__subtitle {
    font-size: var(--e-global-typography-text-font-size, 1rem);
    color: var(--e-global-color-text, #666666);
    margin: 0;
    line-height: 1.5;
}

.easycare-ai-helper--compact .easycare-ai-helper__subtitle {
    font-size: 0.9rem;
}

/* Chips */
.easycare-ai-helper__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.easycare-ai-helper--compact .easycare-ai-helper__chips {
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.easycare-ai-helper__chip {
    background: var(--e-global-color-secondary, #f5f5f5);
    color: var(--e-global-color-text, #333333);
    border: 1px solid var(--e-global-color-secondary, #e0e0e0);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.easycare-ai-helper__chip:hover {
    background: var(--e-global-color-primary, #007bff);
    color: #ffffff;
    border-color: var(--e-global-color-primary, #007bff);
    transform: translateY(-1px);
}

.easycare-ai-helper__chip:active {
    transform: translateY(0);
}

/* Input Group */
.easycare-ai-helper__input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.easycare-ai-helper--compact .easycare-ai-helper__input-group {
    margin-bottom: 1rem;
}

.easycare-ai-helper__input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--e-global-color-secondary, #cccccc);
    border-radius: 4px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.easycare-ai-helper__input:focus {
    outline: none;
    border-color: var(--e-global-color-primary, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.easycare-ai-helper__submit {
    padding: 0.75rem 1.5rem;
    background: var(--e-global-color-primary, #007bff);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.easycare-ai-helper__submit:hover {
    background: var(--e-global-color-accent, #0056b3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.easycare-ai-helper__submit:active {
    transform: translateY(0);
}

.easycare-ai-helper__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Output Area */
.easycare-ai-helper__output {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--e-global-color-secondary, #e0e0e0);
}

.easycare-ai-helper--compact .easycare-ai-helper__output {
    margin-top: 1rem;
    padding-top: 1rem;
}

/* Loading State */
.easycare-ai-helper__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    text-align: center;
}

.easycare-ai-helper__spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--e-global-color-secondary, #f3f3f3);
    border-top: 4px solid var(--e-global-color-primary, #007bff);
    border-radius: 50%;
    animation: easycare-spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes easycare-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.easycare-ai-helper__loading p {
    color: var(--e-global-color-text, #666666);
    margin: 0;
}

/* Error State */
.easycare-ai-helper__error {
    padding: 1.5rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    text-align: center;
}

.easycare-ai-helper__error p {
    color: #856404;
    margin: 0;
    font-weight: 500;
}

/* Result Sections */
.easycare-ai-helper__result {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.easycare-ai-helper--compact .easycare-ai-helper__result {
    gap: 1rem;
}

.easycare-ai-helper__section {
    padding-bottom: 1rem;
}

.easycare-ai-helper__section:not(:last-child) {
    border-bottom: 1px solid var(--e-global-color-secondary, #f0f0f0);
}

.easycare-ai-helper__section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--e-global-color-primary, #000000);
    margin: 0 0 0.75rem 0;
}

.easycare-ai-helper--compact .easycare-ai-helper__section h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.easycare-ai-helper__section-content {
    color: var(--e-global-color-text, #333333);
    line-height: 1.6;
}

.easycare-ai-helper__section-content p {
    margin: 0 0 0.5rem 0;
}

.easycare-ai-helper__section-content p:last-child {
    margin-bottom: 0;
}

.easycare-ai-helper__section-content ul {
    margin: 0;
    padding-left: 1.5rem;
}

.easycare-ai-helper__section-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.easycare-ai-helper__section-content li:last-child {
    margin-bottom: 0;
}

.easycare-ai-helper__section-content a {
    color: var(--e-global-color-primary, #007bff);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.easycare-ai-helper__section-content a:hover {
    color: var(--e-global-color-accent, #0056b3);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .easycare-ai-helper {
        padding: 1.5rem;
    }
    
    .easycare-ai-helper--compact {
        padding: 1rem;
    }
    
    .easycare-ai-helper__input-group {
        flex-direction: column;
    }
    
    .easycare-ai-helper__input,
    .easycare-ai-helper__submit {
        width: 100%;
    }
    
    .easycare-ai-helper__chips {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .easycare-ai-helper__title {
        font-size: 1.5rem;
    }
    
    .easycare-ai-helper--compact .easycare-ai-helper__title {
        font-size: 1.25rem;
    }
    
    .easycare-ai-helper__chip {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}
