/* ==========================================================
   Stellar Agri AI - Core Design System & Styles
   ========================================================== */

:root {
    --bg-dark: #0a110d;
    --bg-card: rgba(18, 30, 23, 0.75);
    --bg-card-hover: rgba(26, 42, 33, 0.85);
    --bg-input: #121e17;
    
    --border-color: rgba(46, 117, 72, 0.25);
    --border-glow: rgba(52, 211, 153, 0.4);
    
    --text-primary: #ecfdf5;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent-green: #10b981;
    --accent-emerald: #059669;
    --accent-gold: #f59e0b;
    --accent-blue: #3b82f6;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    
    --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.15);
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(245, 158, 11, 0.08) 0px, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 24px 60px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.4);
}

.logo-text h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #ecfdf5, #a7f3d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text .tagline {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 20px;
    font-size: 0.82rem;
    color: var(--accent-green);
    font-weight: 500;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
}

/* Banner Card (Hero-free, clean CSS gradient design) */
.banner-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.03));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.banner-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 70%);
    pointer-events: none;
}

.banner-badge {
    align-self: flex-start;
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-green);
}

.banner-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
}

.banner-card p {
    color: var(--text-secondary);
    max-width: 800px;
    font-size: 0.98rem;
}

/* Quick Prompts */
.quick-prompts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.prompt-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.chip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.chip:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent-green);
    transform: translateY(-2px);
    color: #ffffff;
}

/* Input Section */
.input-section {
    position: sticky;
    top: 20px;
    z-index: 100;
}

.chat-form {
    width: 100%;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 8px 8px 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--accent-green);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.2);
}

.input-icon {
    color: var(--text-muted);
    margin-right: 12px;
    flex-shrink: 0;
}

.input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-emerald));
    border: none;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}

.send-btn:hover {
    opacity: 0.92;
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

/* Loader */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 16px;
    color: var(--text-secondary);
}

.spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(16, 185, 129, 0.15);
    border-top-color: var(--accent-green);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Results Area */
.results-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.results-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.intent-badge-container {
    display: flex;
    gap: 8px;
}

.intent-badge {
    padding: 4px 12px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 14px;
    font-size: 0.78rem;
    color: #93c5fd;
    font-weight: 600;
}

.confidence-badge {
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 14px;
    font-size: 0.78rem;
    color: #6ee7b7;
    font-weight: 600;
}

/* Summary Card */
.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-green);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    gap: 16px;
    box-shadow: var(--shadow-card);
}

.summary-icon {
    font-size: 1.8rem;
}

.summary-text h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #ffffff;
}

.summary-text p {
    color: var(--text-primary);
    font-size: 0.98rem;
}

/* Answers Container */
.answers-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.answers-container h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.answers-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answers-list li {
    padding-left: 20px;
    position: relative;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.answers-list li::before {
    content: '•';
    position: absolute;
    left: 4px;
    color: var(--accent-green);
    font-size: 1.3rem;
    line-height: 1;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.info-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

.card-title-icon {
    font-size: 1.3rem;
}

.card-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-highlight {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-highlight .label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.stat-highlight .val {
    font-size: 1.25rem;
    font-weight: 700;
}

.highlight-green { color: var(--accent-green); }
.highlight-red { color: var(--accent-red); }
.highlight-orange { color: #f97316; }
.highlight-gold { color: var(--accent-gold); }

.card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.card-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Pills Flex */
.pills-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.pill-item {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* Warnings & Next Steps */
.action-footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.warnings-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-md);
    padding: 18px;
}

.warnings-box .box-title {
    color: var(--accent-red);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.nextsteps-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-md);
    padding: 18px;
}

.nextsteps-box .box-title {
    color: var(--accent-green);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* JSON Toggle */
.json-toggle-container {
    margin-top: 12px;
}

.toggle-btn {
    background: transparent;
    border: 1px dashed var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-green);
}

.json-preview {
    background: #060b08;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 12px;
    font-family: monospace;
    font-size: 0.82rem;
    color: #6ee7b7;
    overflow-x: auto;
    max-height: 400px;
}

/* Helpers */
.hidden {
    display: none !important;
}

/* Footer */
.app-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* ==========================================================
   Instant AI Voice Call Advisory - Enquiry Form Styles
   ========================================================== */
.call-enquiry-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.09) 0%, rgba(14, 26, 20, 0.85) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(74, 222, 128, 0.28);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    box-shadow: 0 12px 35px -5px rgba(0, 0, 0, 0.5), 0 0 25px rgba(16, 185, 129, 0.1);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
    transition: var(--transition);
}

.call-enquiry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #34d399, transparent);
}

.call-enquiry-card:hover {
    border-color: rgba(74, 222, 128, 0.45);
    box-shadow: 0 16px 40px -5px rgba(0, 0, 0, 0.6), 0 0 35px rgba(16, 185, 129, 0.18);
}

.enquiry-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid rgba(74, 222, 128, 0.35);
    margin-bottom: 12px;
}

.enquiry-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.enquiry-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 22px;
    line-height: 1.5;
}

.enquiry-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.enquiry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #a7f3d0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-field input,
.form-field select {
    width: 100%;
    background: rgba(8, 15, 11, 0.85);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: #ffffff;
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d399' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-field select option {
    background: #0f1914;
    color: #ffffff;
    padding: 10px;
}

.form-field input::placeholder {
    color: var(--text-muted);
}

.form-field input:focus,
.form-field select:focus {
    border-color: #10b981;
    background: rgba(10, 20, 15, 0.95);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.25);
}

.form-field.full-width {
    margin-top: 4px;
}

.enquiry-submit-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.call-now-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transition: var(--transition);
    text-transform: none;
}

.call-now-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.55);
}

.call-now-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.call-note {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.call-note strong {
    color: #6ee7b7;
}

/* Call Status Card */
.call-status-box {
    margin-top: 20px;
    background: rgba(6, 78, 59, 0.35);
    border: 1px solid rgba(52, 211, 153, 0.45);
    border-radius: var(--radius-md);
    padding: 16px 22px;
    animation: fadeIn 0.3s ease;
}

.call-status-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calling-animation-pulse {
    width: 16px;
    height: 16px;
    min-width: 16px;
    border-radius: 50%;
    background-color: #34d399;
    box-shadow: 0 0 15px #34d399;
    animation: pulseRing 1.5s infinite;
}

@keyframes pulseRing {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { transform: scale(1.3); box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.calling-text h4 {
    font-size: 0.98rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 3px;
}

.calling-text p {
    font-size: 0.85rem;
    color: #a7f3d0;
}
