/* Digital Sør Chatbot Styles */

/* Container */
.dsc-chatbot-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    z-index: 999999;
}

/* Flytende posisjon */
.dsc-chatbot-container[data-position="bottom-right"] {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.dsc-chatbot-container[data-position="bottom-left"] {
    position: fixed;
    bottom: 20px;
    left: 20px;
}

/* Inline posisjon */
.dsc-chatbot-container[data-position="inline"] {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
}

.dsc-chatbot-container[data-position="inline"] .dsc-chat-window {
    position: relative;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Chat-knapp */
.dsc-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.dsc-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.dsc-chat-button svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Chat-vindu */
.dsc-chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 600px;
    max-height: 85vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dsc-chatbot-container[data-position="bottom-left"] .dsc-chat-window {
    left: 20px;
    right: auto;
}

.dsc-chatbot-container[data-position="inline"] .dsc-chat-window {
    position: relative;
    width: 100%;
    height: 500px;
    bottom: auto;
    right: auto;
    max-height: none;
}

/* Chat-header */
.dsc-chat-header {
    padding: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px 12px 0 0;
}

.dsc-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dsc-bot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsc-bot-info {
    display: flex;
    flex-direction: column;
}

.dsc-bot-name {
    font-weight: 600;
    font-size: 14px;
}

.dsc-bot-status {
    font-size: 11px;
    opacity: 0.9;
}

.dsc-close-button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.dsc-close-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Chat-meldinger */
.dsc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.dsc-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.dsc-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.dsc-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.dsc-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Meldinger */
.dsc-message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dsc-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dsc-bot-message .dsc-message-avatar {
    background: #e2e8f0;
    color: #4a5568;
}

.dsc-user-message .dsc-message-avatar {
    background: #e0e7ff;
    color: #5a67d8;
}

.dsc-message-content {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 75%;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 13px;
}

.dsc-bot-message .dsc-message-content {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px 12px 12px 4px;
}

.dsc-user-message {
    flex-direction: row-reverse;
}

.dsc-user-message .dsc-message-content {
    background: #0073aa;
    color: #fff;
    border-radius: 12px 12px 4px 12px;
}

/* Formatering i meldinger */
.dsc-message-content strong {
    font-weight: 600;
}

.dsc-message-content em {
    font-style: italic;
}

.dsc-message-content code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
}

.dsc-user-message .dsc-message-content code {
    background: rgba(255, 255, 255, 0.2);
}

/* Skriveindikator */
.dsc-typing-dots {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.dsc-typing-dots span {
    width: 8px;
    height: 8px;
    background: #cbd5e0;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.dsc-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.dsc-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Chat-input */
.dsc-chat-input-container {
    padding: 16px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.dsc-chat-form {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.dsc-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.dsc-chat-input:focus {
    border-color: #0073aa;
}

.dsc-send-button {
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.dsc-send-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.dsc-send-button:active {
    transform: translateY(0);
}

.dsc-powered-by {
    text-align: center;
    font-size: 10px;
    color: #718096;
}

/* Kontaktknapper */
.dsc-contact-buttons {
    margin: 16px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.dsc-contact-title {
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 12px;
    text-align: center;
}

.dsc-contact-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dsc-contact-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.dsc-contact-btn:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dsc-contact-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dsc-contact-btn svg {
    flex-shrink: 0;
    color: #718096;
}

.dsc-email-btn:hover {
    background: #fef5e7;
    border-color: #f6ad55;
    color: #c05621;
}

.dsc-email-btn:hover svg {
    color: #c05621;
}

.dsc-phone-btn:hover {
    background: #e6fffa;
    border-color: #4fd1c7;
    color: #234e52;
}

.dsc-phone-btn:hover svg {
    color: #234e52;
}

.dsc-meeting-btn:hover {
    background: #e6f3ff;
    border-color: #63b3ed;
    color: #2c5282;
}

.dsc-meeting-btn:hover svg {
    color: #2c5282;
}

.dsc-slack-btn:hover {
    background: #f0fff4;
    border-color: #68d391;
    color: #22543d;
}

.dsc-slack-btn:hover svg {
    color: #22543d;
}

/* Responsiv design for kontaktknapper */
@media (max-width: 480px) {
    .dsc-contact-options {
        grid-template-columns: 1fr;
    }
    
    .dsc-contact-btn {
        justify-content: center;
        text-align: center;
    }
}

/* Responsiv design */
@media (max-width: 480px) {
    .dsc-chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        bottom: 10px;
        right: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .dsc-chatbot-container[data-position="bottom-left"] .dsc-chat-window {
        left: 10px;
    }
    
    .dsc-message-content {
        max-width: 70%;
    }
}

