/* Get AI Ranks Chatbot - CSS Styles */

.garc-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

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

.garc-chatbot-header {
    background: linear-gradient(135deg, #1a8f7a 0%, #0d5a4d 100%);
    color: white;
    padding: 16px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.garc-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.garc-header-icon {
    font-size: 24px;
}

.garc-header-text h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.garc-header-text p {
    margin: 4px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.garc-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.garc-close-btn:hover {
    opacity: 0.8;
}

.garc-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.garc-message p {
    margin: 0;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 85%;
    word-wrap: break-word;
}

.bot-message p {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    border-radius: 12px 12px 12px 4px;
}

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

.user-message p {
    background: #1a8f7a;
    color: white;
    border-radius: 12px 12px 4px 12px;
    max-width: 85%;
}

.garc-chatbot-form {
    padding: 12px;
    border-top: 1px solid #e0e0e0;
    background: white;
    border-radius: 0 0 12px 12px;
}

#garc-chat-form {
    display: flex;
    gap: 8px;
}

#garc-message-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#garc-message-input:focus {
    border-color: #1a8f7a;
}

.garc-send-btn {
    background: #1a8f7a;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-weight: 600;
}

.garc-send-btn:hover {
    background: #0d5a4d;
}

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

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

.garc-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.garc-modal-content {
    background-color: white;
    padding: 32px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

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

.garc-close {
    position: absolute;
    right: 16px;
    top: 16px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.garc-close:hover {
    color: #000;
}

.garc-modal-content h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #1a1a1a;
}

.garc-modal-content p {
    color: #666;
    margin: 0 0 24px 0;
    font-size: 14px;
}

.garc-modal-content form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.garc-modal-content input,
.garc-modal-content textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.garc-modal-content input:focus,
.garc-modal-content textarea:focus {
    outline: none;
    border-color: #1a8f7a;
    box-shadow: 0 0 0 3px rgba(26, 143, 122, 0.1);
}

.garc-modal-content textarea {
    resize: vertical;
    min-height: 100px;
}

.garc-submit-btn {
    background: linear-gradient(135deg, #1a8f7a 0%, #0d5a4d 100%);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.garc-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 143, 122, 0.3);
}

.garc-submit-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 480px) {
    .garc-chatbot-container {
        width: calc(100% - 16px);
        height: 100vh;
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 0;
        margin: 8px;
    }

    .garc-modal-content {
        width: calc(100% - 32px);
        padding: 24px;
    }
}

/* Scrollbar styling */
.garc-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.garc-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.garc-chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.garc-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Loading animation */
.garc-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

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

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

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

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