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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.left-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

/* Header Styles */
header {
    background: white;
    border-radius: 15px;
    padding: 15px 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    width: 100%;
}

.header-logo-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

.logo-container {
    padding: 5px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-title {
    text-align: center;
    flex: 1;
}

.language-selector-header {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-container {
    padding: 5px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 2em;
    font-weight: bold;
    color: white;
    font-family: 'Helvetica', sans-serif;
    letter-spacing: 2px;
}

.header-title {
    text-align: left;
}

h1 {
    color: #2d3748;
    font-size: 1.8em;
    margin-bottom: 3px;
}

.tagline {
    color: #718096;
    font-size: 0.95em;
}

.emergency-banner {
    background: #fed7d7;
    color: #c53030;
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
}

.emergency-icon {
    font-size: 1.2em;
    margin-right: 8px;
}

/* Main Layout */
main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Chat Container */
.chat-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #48bb78;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f7fafc;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

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

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: #667eea;
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: #48bb78;
}

.message-content {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 70%;
}

.user-message .message-content {
    background: #667eea;
    color: white;
}

.message-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin-left: 20px;
    line-height: 1.8;
}

/* Welcome Menu Styles */
.welcome-menu {
    list-style: none;
    margin-left: 0 !important;
    padding: 10px 0;
}

.welcome-menu li {
    padding: 12px 16px;
    margin: 8px 0;
    background: linear-gradient(135deg, #f7fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.welcome-menu li:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.welcome-menu li strong {
    color: #667eea;
    margin-right: 8px;
}

.welcome-menu li:hover strong {
    color: white;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 2px solid #e2e8f0;
    background: #f7fafc;
    flex-wrap: wrap;
}

.quick-action-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Chat Input */
.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 2px solid #e2e8f0;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 1em;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: #667eea;
}

.send-btn {
    width: 50px;
    height: 50px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    transition: all 0.3s ease;
}

.send-btn:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.send-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: scale(1);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 350px;
    flex-shrink: 0;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.contact-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-item strong {
    color: #2d3748;
    display: block;
    margin-bottom: 5px;
}

.contact-item p {
    color: #4a5568;
    font-size: 1.1em;
}

.contact-item a {
    color: #667eea;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.tips-list {
    list-style: none;
}

.tips-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #4a5568;
    line-height: 1.5;
}

.tips-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: bold;
}

.crime-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.crime-tag {
    display: inline-block;
    padding: 6px 12px;
    background: #edf2f7;
    color: #4a5568;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 500;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #cbd5e0;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .info-card {
        min-width: 300px;
    }
}

@media (max-width: 768px) {
    .header-logo-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-container {
        padding: 8px;
    }
    
    .logo-image {
        height: 80px;
    }
    
    .logo-text {
        font-size: 1.5em;
    }
    
    .header-title {
        text-align: center;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .chat-container {
        height: 500px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .quick-action-btn {
        width: 100%;
    }
    
    .sidebar {
        flex-direction: column;
    }
    
    .info-card {
        min-width: auto;
    }
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: #fff;
    margin: 3% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

.modal-small {
    max-width: 500px;
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-content h2 {
    color: #2d3748;
    margin-bottom: 10px;
}

/* Option Buttons */
.option-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.option-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.option-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.option-btn strong {
    font-size: 1.2em;
    display: block;
    margin-bottom: 5px;
}

.option-btn small {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 600;
    font-size: 0.95em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

/* Notification Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Expert Consultation Styles */
.expert-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
}

.expert-btn:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.expert-features {
    margin: 25px 0;
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    color: #2d3748;
}

.feature-icon {
    width: 30px;
    height: 30px;
    background: #48bb78;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.pricing-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
}

.price-label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.price-amount {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
}

.price-note {
    font-size: 0.85em;
    opacity: 0.9;
}

.expert-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.btn-full {
    width: 100%;
}

.expert-note {
    margin-top: 20px;
    padding: 15px;
    background: #fef5e7;
    border-left: 4px solid #f39c12;
    border-radius: 5px;
    color: #856404;
}

/* Schedule Section */
.schedule-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.schedule-section:last-of-type {
    border-bottom: none;
}

.schedule-section h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.payment-summary {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    color: #4a5568;
}

.summary-row.total {
    border-top: 2px solid #cbd5e0;
    margin-top: 10px;
    padding-top: 15px;
    color: #2d3748;
    font-size: 1.1em;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}
