/**
 * Insight Page Styles
 * 
 * Design philosophy:
 * - Professional and clean
 * - Modern card-based layout
 * - Excellent readability
 */

/* ========================================
   1. Container and Layout
   ======================================== */

.insight-container {
    max-width: var(--container-max-width-lg);
    margin: 0 auto;
    padding: var(--container-padding-top) var(--container-padding-horizontal);
}

/* ========================================
   2. Header Section (OpenClaw branding)
   ======================================== */

/* Header styles are now in page-header.css */
/* Keeping only page-specific overrides here if needed */

/* ========================================
   3. Form Area
   ======================================== */

.insight-form-card {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 8px rgba(0,0,0,0.04);
}

/* Quota Display */
.insight-quota {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2e7d32;
    font-weight: 400;
}

.insight-quota.quota-error {
    background: #ffebee;
    border-color: #ffcdd2;
    color: #c62828;
}

.insight-quota-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Error Message */
.insight-error-message {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #ffebee;
    border: 1px solid #ef5350;
    border-radius: 8px;
    color: #c62828;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.6;
}

.insight-textarea {
    width: 100%;
    min-height: 180px;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
    color: #2c2c2c;
    background: #ffffff;
}

.insight-textarea:focus {
    outline: none;
    border-color: #2c2c2c;
    background: #ffffff;
}

.insight-textarea::placeholder {
    color: #999;
}

/* Hint Area (below textarea) */
.insight-hint {
    background: #f5f5f5;
    border-left: 2px solid #e0e0e0;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 2px;
    font-size: 0.875rem;
    color: #555;
    line-height: 1.8;
}

.insight-hint-list {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    list-style: disc;
}

.insight-hint-list li {
    margin: 0.25rem 0;
}

.insight-hint-example {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e0e0e0;
}

.insight-hint-example-label {
    font-weight: 500;
    color: #444;
    margin-bottom: 0.375rem;
    display: block;
}

.insight-hint-example-content {
    background: #fff;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: #666;
    line-height: 1.8;
    white-space: pre-line;
}

.insight-char-counter {
    text-align: right;
    font-size: 0.8125rem;
    color: #666;
    margin-top: 0.5rem;
    font-weight: 300;
}

.insight-char-counter.warning {
    color: #ff9800;
}

.insight-char-counter.error {
    color: #f44336;
}

.insight-submit {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-top: 1.5rem;
    background: #2c2c2c;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
}

.insight-submit:hover {
    background: #444;
}

.insight-submit:disabled {
    background: #999;
    cursor: not-allowed;
    opacity: 0.5;
}

/* ========================================
   4. Success State
   ======================================== */

.insight-success {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
}

.insight-success.show {
    display: block;
}

.insight-success-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    color: #4caf50;
}

.insight-success-title {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #2c2c2c;
}

.insight-success-message {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 2rem;
    font-weight: 300;
}

.insight-task-id {
    display: inline-block;
    background: #2c2c2c;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    margin: 0 0.25rem;
}

.insight-new-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: transparent;
    color: #2c2c2c;
    border: 1px solid #2c2c2c;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 300;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.insight-new-btn:hover {
    background: #2c2c2c;
    color: #ffffff;
}

/* ========================================
   5. Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .insight-header {
        padding: 2rem 1rem;
    }
    
    .insight-logo {
        height: 48px;
    }
    
    .insight-title {
        font-size: 2rem;
    }
    
    .insight-subtitle {
        font-size: 1rem;
    }
    
    .insight-form-card {
        padding: 1.5rem;
    }
}

@media (min-width: 769px) {
    .insight-container {
        padding: 3rem 2rem;
    }
}
