/**
 * Smart Suggestions - Contextual inline helpers for prompt building
 * Shows dismissible suggestions as users type their form description
 */

/* Main suggestion card */
.smart-suggestion-card {
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(1, 162, 180, 0.05) 0%, rgba(1, 162, 180, 0.02) 100%);
    border: 2px solid rgba(1, 162, 180, 0.2);
    padding: 1rem 1.25rem;
    animation: slideDown 0.3s ease;
}

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

.suggestion-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.suggestion-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
}

.suggestion-title i {
    color: #01A2B4;
    font-size: 1.1rem;
}

.suggestion-dismiss {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    font-size: 1.25rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.suggestion-dismiss:hover {
    color: #6c757d;
}

.suggestion-content {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 0.75rem;
}

/* Quick action fields */
.suggestion-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.suggestion-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.suggestion-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.suggestion-field input,
.suggestion-field select {
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-width: 120px;
}

.suggestion-field input:focus,
.suggestion-field select:focus {
    outline: none;
    border-color: #01A2B4;
    box-shadow: 0 0 0 3px rgba(1, 162, 180, 0.1);
}

/* Action buttons */
.suggestion-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.suggestion-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.suggestion-actions .btn-primary {
    background-color: #01A2B4;
    border-color: #01A2B4;
}

.suggestion-actions .btn-primary:hover {
    background-color: #018c9a;
    border-color: #018c9a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(1, 162, 180, 0.3);
}

.suggestion-actions .btn-link {
    color: #6c757d;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
}

.suggestion-actions .btn-link:hover {
    color: #495057;
    text-decoration: underline;
}

/* Template suggestions */
.template-suggestions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(1, 162, 180, 0.15);
}

/* Remove border when templates are shown alone without pattern header */
.template-suggestions-standalone {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.template-suggestions-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.template-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.template-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1.5px solid #dee2e6;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.template-chip:hover {
    border-color: #01A2B4;
    color: #01A2B4;
    background: rgba(1, 162, 180, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(1, 162, 180, 0.15);
}

.template-chip i {
    font-size: 0.75rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .smart-suggestion-card {
        padding: 0.875rem 1rem;
    }

    /* Hide contextual quick fields on mobile to save space */
    .suggestion-header,
    .suggestion-fields,
    .suggestion-actions {
        display: none;
    }

    /* Keep template suggestions visible - they're compact and valuable */
    .template-suggestions {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        padding: 0.5rem;
    }

    .template-chips {
        gap: 0.375rem;
    }

    .template-chip {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Fade out animation when dismissed */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.smart-suggestion-card.dismissing {
    animation: fadeOut 0.2s ease forwards;
}
