/* /public/assets/css/public-chat.css */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
    min-height: 100vh;
}

/* Container principal */
.public-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Header público */
.public-header {
    background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.public-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.public-header .logo i {
    font-size: 48px;
}

.public-header .logo h1 {
    font-size: 36px;
}

.public-header .subtitle {
    font-size: 18px;
    opacity: 0.9;
}

/* Main content */
.public-main {
    padding: 40px 20px;
}

/* Hero section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
}

.hero-text h2 {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.features {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #f0f0f0;
    border-radius: 30px;
    color: #555;
}

.feature i {
    color: #075e54;
}

.btn-start-chat {
    display: inline-block;
    background: #075e54;
    color: white;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 18px;
    transition: background 0.3s;
    margin-bottom: 15px;
}

.btn-start-chat:hover {
    background: #128c7e;
}

.small {
    color: #999;
    font-size: 14px;
}

/* FAQ section */
.faq-section {
    margin-bottom: 60px;
}

.faq-section h3,
.testimonials h3 {
    font-size: 28px;
    color: #333;
    text-align: center;
    margin-bottom: 40px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.faq-item {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    transition: transform 0.3s;
}

.faq-item:hover {
    transform: translateY(-5px);
}

.faq-item h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #075e54;
    margin-bottom: 15px;
}

.faq-item p {
    color: #666;
    line-height: 1.6;
}

/* Testimonials */
.testimonials {
    margin-bottom: 60px;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial {
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.testimonial .stars {
    color: #ffc107;
    font-size: 20px;
    margin-bottom: 15px;
}

.testimonial p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-style: italic;
}

.testimonial cite {
    color: #999;
    font-size: 14px;
}

/* Footer público */
.public-footer {
    background: #333;
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.public-footer a {
    color: #128c7e;
    text-decoration: none;
}

.public-footer a:hover {
    text-decoration: underline;
}

.footer-links {
    margin-top: 15px;
    color: #999;
}

/* Chat widget */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #075e54;
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 999;
}

.chat-widget:hover {
    background: #128c7e;
    transform: scale(1.05);
}

.chat-widget i {
    font-size: 20px;
}

/* Chat público */
.public-chat-container {
    max-width: 500px;
    margin: 50px auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: #075e54;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    background: #128c7e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.bot-info h2 {
    font-size: 16px;
    margin-bottom: 3px;
}

.status {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status.online i {
    color: #4caf50;
}

.btn-close {
    color: white;
    text-decoration: none;
    font-size: 20px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.btn-close:hover {
    opacity: 1;
}

.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-image: url('/assets/img/bg-chat.png');
    background-color: #e5ddd5;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover; /* A imagem cobre toda a área */
}

.welcome-message {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 10px;
    margin-bottom: 20px;
}

.welcome-message i {
    font-size: 48px;
    color: #075e54;
    margin-bottom: 15px;
}

.welcome-message h3 {
    color: #333;
    margin-bottom: 10px;
}

.welcome-message p {
    color: #666;
    margin-bottom: 15px;
}

.welcome-message .suggestions {
    list-style: none;
    color: #999;
    font-size: 14px;
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.welcome-message .suggestions li {
    margin-bottom: 5px;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.message.visitor {
    justify-content: flex-end;
}

.message.bot {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 10px;
    position: relative;
}

.message.visitor .message-content {
    background: #dcf8c6;
    border-bottom-right-radius: 0;
}

.message.bot .message-content {
    background: white;
    border-bottom-left-radius: 0;
}

/* APENAS O ESSENCIAL */
.message-content p {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.4;
    margin: 0;
}

.message-content strong {
    color: #075e54;
}

.message-content br {
    display: block;
    content: "";
    margin: 0;
    height: 0.3em;
}

.message-content br + br {
    height: 0.5em;
}

.time {
    font-size: 11px;
    color: #999;
    float: right;
    margin-left: 10px;
}

.input-area {
    background: #f0f0f0;
    padding: 15px;
    border-top: 1px solid #ddd;
}

#chatForm {
    display: flex;
    gap: 10px;
}

#messageInput {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
}

#messageInput:focus {
    border-color: #075e54;
}

button {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: #075e54;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #128c7e;
}

.chat-footer {
    background: #f0f0f0;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    color: #999;
    border-top: 1px solid #ddd;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    padding: 10px 15px;
    background: white;
    border-radius: 10px;
    border-bottom-left-radius: 0;
    max-width: 70px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out;
}

.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 */
@media (max-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr;
    }
    
    .features {
        flex-direction: column;
    }
    
    .faq-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    
    .public-chat-container {
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }
}
