/* CVG Chat - Component Styles */

/* Button Components */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.btn-primary {
    background: var(--cvg-primary);
    color: var(--cvg-white);
}

.btn-primary:hover {
    background: var(--cvg-secondary);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--cvg-light);
    color: var(--cvg-dark);
    border: 1px solid var(--cvg-border);
}

.btn-secondary:hover {
    background: var(--cvg-border);
}

.btn-success {
    background: var(--cvg-success);
    color: var(--cvg-white);
}

.btn-danger {
    background: var(--cvg-danger);
    color: var(--cvg-white);
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

/* Form Components */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--cvg-dark);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--cvg-border);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--cvg-primary);
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.2);
}

.form-control.error {
    border-color: var(--cvg-danger);
}

.form-control.success {
    border-color: var(--cvg-success);
}

/* Card Components */
.card {
    background: var(--cvg-white);
    border: 1px solid var(--cvg-border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px var(--cvg-shadow);
}

.card-header {
    border-bottom: 1px solid var(--cvg-border);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--cvg-dark);
    margin: 0;
}

.card-subtitle {
    font-size: 14px;
    color: var(--cvg-border);
    margin: 5px 0 0 0;
}

/* Badge Components */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--cvg-primary);
    color: var(--cvg-white);
}

.badge-success {
    background: var(--cvg-success);
    color: var(--cvg-white);
}

.badge-warning {
    background: var(--cvg-warning);
    color: var(--cvg-dark);
}

.badge-danger {
    background: var(--cvg-danger);
    color: var(--cvg-white);
}

.badge-light {
    background: var(--cvg-light);
    color: var(--cvg-dark);
}

/* Alert Components */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid transparent;
}

.alert-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.alert-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-danger {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Progress Components */
.progress {
    height: 8px;
    background: var(--cvg-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--cvg-primary);
    transition: width 0.3s ease;
}

.progress-bar-success {
    background: var(--cvg-success);
}

.progress-bar-warning {
    background: var(--cvg-warning);
}

.progress-bar-danger {
    background: var(--cvg-danger);
}

/* Tooltip Components */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background: var(--cvg-dark);
    color: var(--cvg-white);
    text-align: center;
    border-radius: 4px;
    padding: 8px;
    position: absolute;
    z-index: 1001;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Dropdown Components */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: var(--cvg-white);
    min-width: 160px;
    box-shadow: 0 8px 16px var(--cvg-shadow);
    z-index: 1001;
    border-radius: 4px;
    border: 1px solid var(--cvg-border);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    color: var(--cvg-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background: var(--cvg-light);
}

/* List Components */
.list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-group-item {
    padding: 12px 16px;
    border: 1px solid var(--cvg-border);
    background: var(--cvg-white);
}

.list-group-item:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.list-group-item:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

.list-group-item + .list-group-item {
    border-top: none;
}

.list-group-item.active {
    background: var(--cvg-primary);
    color: var(--cvg-white);
    border-color: var(--cvg-primary);
}

/* Avatar Components */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cvg-primary);
    color: var(--cvg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.avatar-small {
    width: 24px;
    height: 24px;
    font-size: 11px;
}

.avatar-large {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.avatar-online::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: var(--cvg-success);
    border: 2px solid var(--cvg-white);
    border-radius: 50%;
}

/* Tab Components */
.tabs {
    border-bottom: 1px solid var(--cvg-border);
}

.tab-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tab-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    color: var(--cvg-dark);
}

.tab-item:hover {
    background: var(--cvg-light);
}

.tab-item.active {
    border-bottom-color: var(--cvg-primary);
    color: var(--cvg-primary);
}

.tab-content {
    padding: 20px 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--cvg-primary); }
.text-success { color: var(--cvg-success); }
.text-warning { color: var(--cvg-warning); }
.text-danger { color: var(--cvg-danger); }
.text-muted { color: var(--cvg-border); }

.bg-primary { background: var(--cvg-primary); color: var(--cvg-white); }
.bg-light { background: var(--cvg-light); }
.bg-white { background: var(--cvg-white); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-block { display: inline-block; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.m-0 { margin: 0; }
.m-1 { margin: 8px; }
.m-2 { margin: 16px; }
.m-3 { margin: 24px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* CVG Specific Components */
.cvg-header {
    background: var(--cvg-gradient);
    color: var(--cvg-white);
    padding: 20px;
    text-align: center;
}

.cvg-footer {
    background: var(--cvg-dark);
    color: var(--cvg-white);
    padding: 15px;
    text-align: center;
    font-size: 12px;
}

.cvg-divider {
    height: 1px;
    background: var(--cvg-border);
    margin: 20px 0;
}

.cvg-highlight {
    background: linear-gradient(120deg, transparent 0%, var(--cvg-accent) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: highlight 2s ease-in-out infinite;
}

@keyframes highlight {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Full-Page Chat Interface Components */
.chat-main {
    min-height: 100vh;
    background: linear-gradient(135deg, #2f5233 0%, #4a7c59 50%, #7ba68a 100%);
    color: white;
}

.chat-hero {
    padding: 80px 20px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.neuron-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.choice-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.choice-btn {
    background: rgba(255,255,255,0.95);
    color: #2f5233;
    padding: 2rem;
    border: 3px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.choice-btn:hover {
    transform: translateY(-5px);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.choice-btn.selected {
    border-color: #4a7c59;
    background: rgba(255,255,255,1);
}

.choice-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.choice-text {
    display: block;
    font-size: 1.1rem;
}

.contact-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.form-container {
    background: rgba(255,255,255,0.95);
    color: #2f5233;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

.form-container h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2f5233;
}

.form-container p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #64748b;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row.single {
    grid-template-columns: 1fr;
}

.form-row input,
.form-row select {
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    background: white;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #4a7c59;
}

.submit-btn {
    background: linear-gradient(135deg, #4a7c59, #3d6b47);
    color: white;
    padding: 18px 40px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #3d6b47, #2f5233);
    transform: translateY(-2px);
}

.chat-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.chat-container {
    background: rgba(255,255,255,0.95);
    color: #2f5233;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: #4a7c59;
    color: white;
    padding: 20px;
    text-align: center;
}

.chat-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.connection-status {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: 400px;
    background: #f8fafc;
}

.message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 15px;
    max-width: 80%;
}

.message.staff {
    background: #e3f2fd;
    margin-left: 0;
    border-left: 4px solid #4a7c59;
}

.message.user {
    background: #f3e5f5;
    margin-left: auto;
    text-align: right;
    border-right: 4px solid #9c27b0;
}

.message.system {
    background: #fff3cd;
    margin: 0 auto;
    text-align: center;
    border: 1px solid #ffeaa7;
    max-width: 60%;
}

.message .sender {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.message .content {
    line-height: 1.4;
}

.message .timestamp {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
}

.chat-input-area {
    padding: 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.message-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.message-input-container input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 16px;
}

.message-input-container input:focus {
    outline: none;
    border-color: #4a7c59;
}

.send-message-btn {
    background: #4a7c59;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.send-message-btn:hover {
    background: #3d6b47;
}

.chat-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-btn {
    background: rgba(74, 124, 89, 0.1);
    color: #4a7c59;
    border: 1px solid #4a7c59;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #4a7c59;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .choice-buttons {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .chat-actions {
        flex-direction: column;
    }
}
