/* IT2core Components CSS */

/* ==================== DARK MODE ==================== */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);

    --cloud: #1e3a5f;
    --cloud-accent: #38bdf8;
    --dev: #4a1942;
    --dev-accent: #f472b6;
    --devops: #134e3a;
    --devops-accent: #34d399;
    --support: #4a3728;
    --support-accent: #fbbf24;
    --text: #f1f5f9;
    --text-light: #94a3b8;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal {
    background: var(--bg-card);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-body p,
[data-theme="dark"] .modal-body ul li {
    color: var(--text-secondary);
}

[data-theme="dark"] .modal-close {
    background: var(--bg-secondary);
}

[data-theme="dark"] .modal-close:hover {
    background: var(--border-color);
}

[data-theme="dark"] .modal-close svg {
    color: var(--text-primary);
}

[data-theme="dark"] .modal-body ul li {
    border-bottom-color: var(--border-color);
}

/* Logo container dark mode - inverted shadow */
[data-theme="dark"] .logo-container {
    background: var(--bg-secondary);
    box-shadow:
        0 10px 40px rgba(255, 255, 255, 0.08),
        0 0 0 6px var(--bg-secondary),
        0 0 0 8px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .logo-container::before {
    background: var(--bg-secondary);
}

[data-theme="dark"] .logo-container:hover {
    box-shadow:
        0 20px 60px rgba(255, 255, 255, 0.12),
        0 0 0 6px var(--bg-secondary),
        0 0 0 8px rgba(255, 255, 255, 0.15);
}

/* Circle shadow in dark mode */
[data-theme="dark"] .circle {
    box-shadow:
        0 25px 60px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .company-info h3,
[data-theme="dark"] .info-item strong {
    color: var(--text-primary);
}

[data-theme="dark"] footer {
    background: var(--bg-secondary);
    border-top-color: var(--border-color);
}

/* Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    color: var(--text-primary);
}

.theme-toggle .icon-sun,
[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

/* ==================== COOKIE CONSENT ==================== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 1rem 2rem;
    box-shadow: 0 -4px 20px var(--shadow-color);
    z-index: 10000;
    display: none;
    border-top: 1px solid var(--border-color);
}

.cookie-consent.show {
    display: block;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.cookie-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.cookie-text a {
    color: var(--cloud-accent);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.cookie-btn.accept {
    background: linear-gradient(135deg, #0284c7, #059669);
    color: white;
}

.cookie-btn.accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.cookie-btn.decline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.cookie-btn.decline:hover {
    background: var(--bg-secondary);
}

/* ==================== LIVE CHAT WIDGET ==================== */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #059669);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.4);
    transition: all 0.3s ease;
}

.chat-button:hover {
    transform: scale(1.1);
}

.chat-button svg {
    width: 28px;
    height: 28px;
    color: white;
}

.chat-button .icon-close {
    display: none;
}

.chat-widget.open .chat-button .icon-chat {
    display: none;
}

.chat-widget.open .chat-button .icon-close {
    display: block;
}

.chat-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 360px;
    height: 480px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 10px 40px var(--shadow-color);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.chat-widget.open .chat-window {
    display: flex;
    animation: chatOpen 0.3s ease;
}

@keyframes chatOpen {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-header {
    background: linear-gradient(135deg, #0284c7, #059669);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-header-avatar svg {
    width: 24px;
    height: 24px;
}

.chat-header-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.chat-header-info p {
    font-size: 0.75rem;
    opacity: 0.9;
    margin: 0;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.chat-message.visitor {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.agent {
    background: var(--bg-secondary);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message.system {
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-align: center;
    align-self: center;
    font-style: italic;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-input:focus {
    border-color: #0284c7;
}

.chat-send {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #059669);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.chat-send:hover {
    transform: scale(1.05);
}

.chat-send svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* Chat pre-form (before starting) */
.chat-preform {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-preform h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.chat-preform input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
}

.chat-preform input:focus,
.chat-preform textarea:focus {
    border-color: #0284c7;
}

.chat-preform textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
    width: 100%;
    min-height: 80px;
}

.chat-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    flex: 1;
}

.chat-success p {
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.chat-success button {
    color: var(--text-primary);
    transition: all 0.2s;
}

.chat-success button:hover {
    border-color: #0284c7;
    color: #0284c7;
}

.chat-preform button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #0284c7, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-preform button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

/* Responsive */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 75px;
        right: 0;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }

    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}
