/* ============================================
   Nored Farms - Floating Chat Widget
   ============================================ */

.chat-widget-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-primary, #50e8c0);
    color: #12181a;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-widget-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.chat-widget-btn svg {
    width: 28px;
    height: 28px;
    transition: opacity 0.2s ease;
}

.chat-widget-btn .chat-close-icon {
    display: none;
}

.chat-widget-btn.active .chat-open-icon {
    display: none;
}

.chat-widget-btn.active .chat-close-icon {
    display: block;
}

.chat-widget-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: var(--color-error, #c45c4b);
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 500;
    color: #bccac4;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #1e2628;
}

/* Chat Panel */
.chat-widget-panel {
    position: fixed;
    bottom: 6.5rem;
    right: 2rem;
    width: 380px;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 10rem);
    background: var(--color-bg, #1e2628);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35), 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9997;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-widget-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Panel Header */
.chat-panel-header {
    background: var(--color-primary, #50e8c0);
    color: #12181a;
    padding: 1.25rem 1.5rem;
}

.chat-panel-header h3 {
    margin: 0 0 0.25rem;
    font-family: var(--font-display, 'Inter', sans-serif);
    font-size: 1.1rem;
    font-weight: 500;
}

.chat-panel-header p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.85;
}

/* Panel Body */
.chat-panel-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.chat-form-group {
    margin-bottom: 1rem;
}

.chat-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-muted, #506460);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.chat-form-group input,
.chat-form-group textarea,
.chat-form-group select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--color-border, rgba(80, 232, 192, 0.12));
    border-radius: 8px;
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.9rem;
    background: var(--color-bg, #1e2628);
    color: var(--color-text, #bccac4);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.chat-form-group input:focus,
.chat-form-group textarea:focus,
.chat-form-group select:focus {
    outline: none;
    border-color: var(--color-primary, #50e8c0);
    box-shadow: 0 0 0 3px rgba(80, 232, 192, 0.12);
}

.chat-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.chat-submit-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary, #50e8c0);
    color: #12181a;
    border: none;
    border-radius: 8px;
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.chat-submit-btn:hover {
    filter: brightness(1.1);
}

.chat-submit-btn:active {
    transform: scale(0.98);
}

.chat-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chat-submit-btn svg {
    width: 18px;
    height: 18px;
}

/* Success State */
.chat-success {
    text-align: center;
    padding: 2rem 1rem;
}

.chat-success-icon {
    width: 56px;
    height: 56px;
    background: rgba(80, 232, 192, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.chat-success-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary, #50e8c0);
}

.chat-success h4 {
    margin: 0 0 0.5rem;
    font-family: var(--font-display, 'Inter', sans-serif);
    font-size: 1.1rem;
}

.chat-success p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-text-muted, #506460);
    line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chat-widget-panel {
        right: 0.75rem;
        bottom: 5.5rem;
        width: calc(100vw - 1.5rem);
        max-height: calc(100vh - 7rem);
    }

    .chat-widget-btn {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 52px;
        height: 52px;
    }
}
