/**
 * BotSpot WP Appendix Styles
 *
 * Inherits theme styles while providing clean structural CSS
 *
 * @package BotDot_WP
 * @version 0.7.0
 */

/* Main appendix content container - edge-to-edge */
.botdot-appendix-content {
    margin: 0;
    padding: 0;
    clear: both;
    width: 100%;
}

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

/* Appendix items */
.botdot-appendix-item {
    margin: 0;
    padding: 1rem;
    background-color: var(--wp--preset--color--background, rgba(0, 0, 0, 0.01));
    border-radius: 0;
    border-left: none;
    border-bottom: 1px solid var(--wp--preset--color--border, rgba(0, 0, 0, 0.1));
}

.botdot-appendix-item:last-child {
    border-bottom: none;
}

.botdot-appendix-item-type {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1em;
    font-weight: 700;
    color: var(--wp--preset--color--primary, #0073aa);
    text-transform: capitalize;
}

/* Properties list */
.botdot-appendix-properties {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(120px, auto) 1fr;
    gap: 0.75rem 1.5rem;
}

.botdot-appendix-properties dt {
    font-weight: 600;
    color: var(--wp--preset--color--foreground, #333);
    align-self: start;
    padding-top: 0.25rem;
}

.botdot-appendix-properties dd {
    margin: 0;
    color: var(--wp--preset--color--foreground, #666);
    word-break: break-word;
}

/* Mobile: stack properties vertically */
@media (max-width: 640px) {
    .botdot-appendix-properties {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .botdot-appendix-properties dt {
        font-size: 0.9em;
        margin-bottom: -0.25rem;
    }
}

/* Nested content */
.botdot-appendix-nested {
    margin-top: 0.75rem;
    padding: 0.75rem;
    padding-left: 1rem;
    border-left: 3px solid var(--wp--preset--color--secondary, rgba(0, 0, 0, 0.15));
    background-color: var(--wp--preset--color--background, rgba(0, 0, 0, 0.02));
    border-radius: 3px;
}

/* Lists */
.botdot-appendix-list {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    list-style-type: circle;
}

.botdot-appendix-list li {
    margin-bottom: 0.25rem;
}

/* Links */
.botdot-appendix-link {
    word-break: break-all;
    color: var(--wp--preset--color--link, #0073aa);
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: all 0.2s ease;
}

.botdot-appendix-link:hover {
    text-decoration-style: solid;
    opacity: 0.8;
}

/* Metadata */
.botdot-appendix-metadata {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--wp--preset--color--border, rgba(0, 0, 0, 0.1));
    text-align: right;
}

.botdot-appendix-meta-text {
    color: var(--wp--preset--color--foreground, #666);
    font-size: 0.85em;
    font-style: italic;
}

/* Generic data */
.botdot-appendix-data {
    display: grid;
    grid-template-columns: minmax(120px, auto) 1fr;
    gap: 0.75rem 1.5rem;
}

.botdot-appendix-data dt {
    font-weight: 600;
    color: var(--wp--preset--color--foreground, #333);
}

.botdot-appendix-data dd {
    margin: 0;
    color: var(--wp--preset--color--foreground, #666);
}

@media (max-width: 640px) {
    .botdot-appendix-data {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Text content */
.botdot-appendix-text {
    line-height: 1.7;
    color: var(--wp--preset--color--foreground, #444);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .botdot-appendix-item {
        background-color: rgba(255, 255, 255, 0.02);
    }
}

/* Print styles */
@media print {
    .botdot-appendix-content {
        page-break-inside: avoid;
    }
}
