/**
 * LLMs Content Mapper - Public Styles
 */

/* ============================================
   Share Buttons Base Styles
   ============================================ */

.llms-share-buttons {
    margin: 20px 0;
    padding: 15px;
    clear: both;
    --button-border-radius: 6px;
    --button-spacing: 10px;
    --icon-padding: 5px;
}

.llms-share-title {
    font-size: var(--title-font-size, 14px);
    font-weight: 600;
    margin-bottom: var(--title-margin-bottom, 12px);
    color: var(--title-color, #333);
}

.llms-share-buttons-wrapper {
    display: flex;
    gap: var(--button-spacing);
}

.llms-share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ffffff;
    border: 2px solid var(--platform-color, #333);
    border-radius: var(--button-border-radius);
    color: var(--platform-color, #333);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.llms-share-button:hover {
    background: var(--platform-color, #333);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.llms-share-button:active {
    transform: translateY(0);
}

.llms-share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: var(--icon-padding, 5px);
}

.llms-share-icon svg {
    display: block;
}

.llms-share-icon img.custom-platform-icon {
    border-radius: 4px;
    object-fit: contain;
}

.llms-share-label {
    white-space: nowrap;
}

/* ============================================
   Alignment Styles
   ============================================ */

.llms-align-left .llms-share-buttons-wrapper {
    justify-content: flex-start;
}

.llms-align-center {
    text-align: center;
}

.llms-align-center .llms-share-buttons-wrapper {
    justify-content: center;
}

.llms-align-right .llms-share-buttons-wrapper {
    justify-content: flex-end;
}

/* Title alignment for regular layouts */
.llms-align-left .llms-share-title {
    text-align: left;
}

.llms-align-center .llms-share-title {
    text-align: center;
}

.llms-align-right .llms-share-title {
    text-align: right;
}

/* Title alignment for sidebar (vertical) layout */
.llms-share-sidebar .llms-share-title.text-left {
    align-items: flex-start;
}

.llms-share-sidebar .llms-share-title.text-center {
    align-items: center;
}

.llms-share-sidebar .llms-share-title.text-right {
    align-items: flex-end;
}

/* ============================================
   Display Style: Inline (Default)
   ============================================ */

.llms-share-inline .llms-share-buttons-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
}

/* ============================================
   Display Style: Sidebar
   ============================================ */

.llms-share-sidebar {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 15px 10px;
    margin: 0;
}

.llms-share-sidebar.llms-float-left {
    left: 20px;
    right: auto;
}

.llms-share-sidebar.llms-float-right {
    right: 20px;
    left: auto;
}

.llms-share-sidebar .llms-share-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin: 0 0 15px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    width: 100%;
    /* For vertical text, align-items controls horizontal alignment */
    align-items: flex-start;
}

.llms-share-sidebar .llms-share-buttons-wrapper {
    flex-direction: column;
    gap: 12px;
}

.llms-share-sidebar .llms-share-button {
    justify-content: center;
    padding: 12px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.llms-share-sidebar .llms-share-label {
    display: none;
}

/* ============================================
   Display Style: Floating
   ============================================ */

.llms-share-floating {
    position: fixed;
    bottom: 30px;
    z-index: 999;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 20px;
    margin: 0;
    max-width: 300px;
}

.llms-share-floating.llms-float-right {
    right: 30px;
    left: auto;
}

.llms-share-floating.llms-float-left {
    left: 30px;
    right: auto;
}

.llms-share-floating .llms-share-buttons-wrapper {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--button-spacing);
}

.llms-share-floating .llms-share-button {
    flex: 1 1 calc(50% - 5px);
    justify-content: center;
    min-width: 120px;
}

/* ============================================
   Display Style: Grid
   ============================================ */

.llms-share-grid .llms-share-buttons-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--button-spacing);
}

.llms-share-grid .llms-share-button {
    justify-content: center;
    padding: 16px 20px;
}

/* ============================================
   Icon Only Styles
   ============================================ */

.llms-share-button.llms-icon-only {
    padding: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    justify-content: center;
}

.llms-share-button.llms-icon-only .llms-share-label {
    display: none;
}

/* ============================================
   Platform Specific Colors
   ============================================ */

.llms-share-chatgpt {
    --platform-color: #10a37f;
}

.llms-share-perplexity {
    --platform-color: #20808d;
}

.llms-share-claude {
    --platform-color: #d97757;
}

.llms-share-grok {
    --platform-color: #000000;
}

.llms-share-gemini {
    --platform-color: #4285f4;
}

.llms-share-copilot {
    --platform-color: #0078d4;
}

/* ============================================
   Responsive Styles
   ============================================ */

@media (max-width: 768px) {
    .llms-share-sidebar.llms-float-left {
        left: 10px;
        right: auto;
    }
    
    .llms-share-sidebar.llms-float-right {
        right: 10px;
        left: auto;
    }
    
    .llms-share-sidebar {
        padding: 12px 8px;
    }
    
    .llms-share-sidebar .llms-share-button {
        width: 40px;
        height: 40px;
        padding: 10px;
    }
    
    .llms-share-floating {
        bottom: 20px;
        right: 20px;
        max-width: 250px;
        padding: 15px;
    }
    
    .llms-share-inline .llms-share-buttons-wrapper,
    .llms-share-grid .llms-share-buttons-wrapper {
        gap: 8px;
    }
    
    .llms-share-inline .llms-share-button,
    .llms-share-grid .llms-share-button {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .llms-share-inline .llms-share-button .llms-share-label {
        display: none;
    }
    
    .llms-share-inline .llms-share-button {
        width: 40px;
        height: 40px;
        padding: 10px;
        border-radius: 50%;
        justify-content: center;
    }
    
    .llms-share-grid .llms-share-buttons-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   Animation Effects
   ============================================ */

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

.llms-share-buttons {
    animation: llmsFadeIn 0.4s ease-out;
}

.llms-share-button {
    position: relative;
    overflow: hidden;
}

.llms-share-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.llms-share-button:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   Dark Mode Support
   ============================================ */

@media (prefers-color-scheme: dark) {
    .llms-share-buttons {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .llms-share-title {
        color: #e0e0e0;
    }
    
    .llms-share-button {
        background: rgba(255, 255, 255, 0.1);
        border-color: var(--platform-color, #666);
        color: #e0e0e0;
    }
    
    .llms-share-sidebar,
    .llms-share-floating {
        background: rgba(30, 30, 30, 0.95);
        backdrop-filter: blur(10px);
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .llms-share-buttons {
        display: none;
    }
}
