/* Copy Code Widget Styles */
.dcs-copy-code-wrapper {
    margin: 20px 0;
}

.dcs-copy-code-box {
    position: relative;
    background: #1e1e1e;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.dcs-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dcs-code-language {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
}

.dcs-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #007aff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.dcs-copy-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.dcs-copy-btn:active {
    transform: translateY(0);
}

.dcs-copy-btn i {
    font-size: 14px;
}

.dcs-copy-btn.copied {
    background: #28a745;
}

.dcs-copy-btn.copied i::before {
    content: "\f00c";
    /* FontAwesome check icon */
}

.dcs-code-content {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #f8f8f2;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.dcs-code-content code {
    display: block;
    padding: 0;
    background: transparent;
    border: none;
    color: inherit;
}

/* Scrollbar Styling */
.dcs-code-content::-webkit-scrollbar {
    height: 8px;
}

.dcs-code-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.dcs-code-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.dcs-code-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Light Mode Adjustments */
body.light-mode .dcs-copy-code-box {
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-mode .dcs-code-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .dcs-code-language {
    color: #666;
}

body.light-mode .dcs-code-content {
    color: #2d2d2d;
}

body.light-mode .dcs-code-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .dcs-code-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

body.light-mode .dcs-code-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .dcs-copy-code-box {
        padding: 15px;
    }

    .dcs-code-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .dcs-copy-btn {
        align-self: flex-end;
    }

    .dcs-code-content {
        font-size: 12px;
    }
}

/* Animation for Copy Success */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.dcs-copy-btn.copied {
    animation: pulse 0.3s ease;
}