/* Click to Tweet Styling */

:root {
    --sharematrix-ctt-accent-color: #1f75e1;
    --sharematrix-ctt-text-color: #333;
    --sharematrix-ctt-bg-light: #f5f5f5;
    --sharematrix-ctt-bg-gray: #e8e8e8;
    --sharematrix-ctt-border-color: #ddd;
}

/* Base Click to Tweet Box */
.sharematrix-click-to-tweet {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    margin: 20px 0;
    border-radius: 6px;
    border: 2px solid var(--sharematrix-ctt-accent-color);
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    transition: all 0.3s ease;
}

.sharematrix-click-to-tweet:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--sharematrix-ctt-accent-color);
}

/* Click to Tweet Content */
.sharematrix-ctt-content {
    flex: 1;
    min-width: 0;
}

.sharematrix-ctt-text {
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--sharematrix-ctt-text-color);
    word-break: break-word;
}

/* Click to Tweet Button */
.sharematrix-ctt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: var(--sharematrix-ctt-accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    border: none;
}

.sharematrix-ctt-button:hover {
    background-color: darken(var(--sharematrix-ctt-accent-color), 10%);
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sharematrix-ctt-button:active {
    transform: translateY(0);
}

/* Twitter Icon in Button */
.sharematrix-ctt-button::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M23 3a10.9 10.9 0 01-3.14 1.53 4.48 4.48 0 00-7.86 3v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2s9 5 20 5a9.5 9.5 0 00-9-5.5c4.75 2.25 7-0.1 7-0.1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

/* Position Variants */
.sharematrix-click-to-tweet.cta-left {
    flex-direction: row-reverse;
}

.sharematrix-click-to-tweet.cta-right {
    flex-direction: row;
}

/* Theme: Default (Blue Background) */
.sharematrix-click-to-tweet.sharematrix-ctt-default {
    background-color: rgba(31, 117, 225, 0.1);
    border-color: var(--sharematrix-ctt-accent-color);
}

.sharematrix-click-to-tweet.sharematrix-ctt-default .sharematrix-ctt-text {
    color: var(--sharematrix-ctt-text-color);
}

/* Theme: Simple (Transparent Background) */
.sharematrix-click-to-tweet.sharematrix-ctt-simple {
    background-color: transparent;
    border: 2px solid var(--sharematrix-ctt-accent-color);
}

.sharematrix-click-to-tweet.sharematrix-ctt-simple .sharematrix-ctt-text {
    color: var(--sharematrix-ctt-text-color);
}

/* Theme: Simple Alt (Gray Background) */
.sharematrix-click-to-tweet.sharematrix-ctt-simple-alt {
    background-color: var(--sharematrix-ctt-bg-light);
    border-color: var(--sharematrix-ctt-bg-gray);
}

.sharematrix-click-to-tweet.sharematrix-ctt-simple-alt .sharematrix-ctt-text {
    color: var(--sharematrix-ctt-text-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sharematrix-click-to-tweet {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .sharematrix-click-to-tweet.cta-left {
        flex-direction: column;
    }

    .sharematrix-click-to-tweet.cta-right {
        flex-direction: column;
    }

    .sharematrix-ctt-button {
        width: 100%;
        text-align: center;
    }

    .sharematrix-ctt-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .sharematrix-click-to-tweet {
        padding: 12px;
        gap: 10px;
    }

    .sharematrix-ctt-text {
        font-size: 13px;
    }

    .sharematrix-ctt-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .sharematrix-click-to-tweet {
        background-color: #2a2a2a;
        border-color: var(--sharematrix-ctt-accent-color);
    }

    .sharematrix-ctt-text {
        color: #e0e0e0;
    }

    .sharematrix-click-to-tweet.sharematrix-ctt-default {
        background-color: rgba(31, 117, 225, 0.15);
    }

    .sharematrix-click-to-tweet.sharematrix-ctt-simple {
        background-color: transparent;
    }

    .sharematrix-click-to-tweet.sharematrix-ctt-simple-alt {
        background-color: #3a3a3a;
        border-color: #4a4a4a;
    }
}

/* Animation for smooth appearance */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sharematrix-click-to-tweet {
    animation: slideInUp 0.3s ease;
}
