/**
 * CitePress – Frontend Styles
 */
:root {
    --cpress-bg: #ffffff;
    --cpress-header-bg: #f8fafc;
    --cpress-border: #e2e8f0;
    --cpress-text: #334155;
    --cpress-heading: #0f172a;
    --cpress-accent: #2563eb;
    --cpress-accent-hover: #1d4ed8;
    --cpress-btn-bg: #ffffff;
    --cpress-btn-border: #cbd5e1;
    --cpress-btn-text: #475569;
    --cpress-success: #16a34a;
    --cpress-radius: 8px;
    --cpress-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
}

.citepress-box {
    margin: 2em 0;
    background-color: var(--cpress-bg);
    border: 1px solid var(--cpress-border);
    border-radius: var(--cpress-radius);
    box-shadow: var(--cpress-shadow);
    overflow: hidden;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.6;
    color: var(--cpress-text);
}

.citepress-box-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background-color: var(--cpress-header-bg);
    padding: 10px 16px;
    border-bottom: 1px solid var(--cpress-border);
}

.citepress-box-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--cpress-heading);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}

.citepress-box-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Style Switcher Dropdown */
.citepress-style-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--cpress-btn-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    border: 1px solid var(--cpress-btn-border);
    border-radius: 6px;
    padding: 5px 26px 5px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--cpress-btn-text);
    cursor: pointer;
    outline: none;
    transition: all 0.15s ease;
    line-height: 1.3;
}

.citepress-style-select:hover,
.citepress-style-select:focus {
    border-color: var(--cpress-accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Copy Button */
.citepress-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: var(--cpress-btn-bg);
    border: 1px solid var(--cpress-btn-border);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--cpress-btn-text);
    cursor: pointer;
    outline: none;
    transition: all 0.15s ease;
    line-height: 1.3;
    user-select: none;
}

.citepress-copy-btn:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
}

.citepress-copy-btn.citepress-copied {
    background-color: #f0fdf4;
    border-color: var(--cpress-success);
    color: var(--cpress-success);
}

.citepress-copy-btn .citepress-icon {
    flex-shrink: 0;
}

/* Citation Body */
.citepress-box-body {
    padding: 16px;
    transition: opacity 0.15s ease-in-out;
    word-break: break-word;
    font-family: Georgia, Cambria, "Times New Roman", Times, serif;
    font-size: 15.5px;
    line-height: 1.65;
}

.citepress-box-body em {
    font-style: italic;
}

/* Hidden JSON Data container */
.citepress-styles-data {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .citepress-box-heading {
        flex-direction: column;
        align-items: flex-start;
    }
    .citepress-box-controls {
        width: 100%;
        justify-content: space-between;
    }
    .citepress-style-select {
        flex: 1;
    }
}