/* Notice/Callout Boxes */

/* Base notice/callout styling */
.notice, .callout {
    display: flex;
    margin: 1.5rem 0;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
    background-color: var(--notice-bg, #f8f9fa);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow: hidden;
}

.notice-icon, .callout-icon {
    flex-shrink: 0;
    margin-right: 1rem;
    font-size: 1.5rem;
    line-height: 1;
}

.notice-content, .callout-content {
    flex: 1;
    color: #1A1A1C !important;
    min-width: 0;
}

/* All text in notices should be dark, except code blocks, links, copy buttons and their icons */
.notice-content *:not(pre):not(pre *):not(a):not(.copy-code-btn):not(.highlight):not(.fas):not(.fa-copy):not(.fa-check),
.callout-content *:not(pre):not(pre *):not(a):not(.copy-code-btn):not(.highlight):not(.fas):not(.fa-copy):not(.fa-check) {
    color: #1A1A1C !important;
}

.notice-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.notice-content p:last-child,
.callout-content p:last-child {
    margin-bottom: 0;
}

/* Notice type: note / info (blue) */
.notice-note, .notice-info, .callout-note {
    --notice-bg: #e3f2fd;
    --notice-border: #2196f3;
    --notice-icon: #1976d2;
    border-left-color: var(--notice-border);
    background-color: var(--notice-bg);
    color: #1A1A1C !important;
}

.notice-note .notice-icon,
.notice-info .notice-icon,
.callout-note .callout-icon {
    color: var(--notice-icon);
}

/* Notice type: tip / success (green) */
.notice-tip, .notice-success {
    --notice-bg: #e8f5e9;
    --notice-border: #4caf50;
    --notice-icon: #388e3c;
    border-left-color: var(--notice-border);
    background-color: var(--notice-bg);
    color: #1A1A1C !important;
}

.notice-tip .notice-icon,
.notice-success .notice-icon {
    color: var(--notice-icon);
}

/* Notice type: warning / caution (yellow) */
.notice-warning, .notice-caution, .callout-warning {
    --notice-bg: #fff3e0;
    --notice-border: #ff9800;
    --notice-icon: #f57c00;
    border-left-color: var(--notice-border);
    background-color: var(--notice-bg);
    color: #1A1A1C !important;
}

.notice-warning .notice-icon,
.notice-caution .notice-icon,
.callout-warning .callout-icon {
    color: var(--notice-icon);
}

/* Notice type: important / danger (red) */
.notice-important, .notice-danger, .callout-important {
    --notice-bg: #ffebee;
    --notice-border: #f44336;
    --notice-icon: #d32f2f;
    border-left-color: var(--notice-border);
    background-color: var(--notice-bg);
    color: #1A1A1C !important;
}

.notice-important .notice-icon,
.notice-danger .notice-icon,
.callout-important .callout-icon {
    color: var(--notice-icon);
}

/* Explicit link colors for notice boxes - works in both themes */
.notice a, .callout a {
    color: #003D89 !important;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.notice a:hover, .callout a:hover {
    color: #002A5E !important;
    text-decoration-thickness: 2px;
}

/* Dark theme: Just add box shadow, colors handled by base styles */
[data-theme="dark"] .notice,
[data-theme="dark"] .callout {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Code blocks inside notices should look exactly like regular code blocks */
.notice .highlight,
.callout .highlight {
    background: transparent !important;
    margin: 0.5rem 0;
    border-radius: 6px;
    overflow: visible;
    position: relative;
}

.notice pre,
.callout pre {
    background-color: #272822 !important;
    color: var(--code-text);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 12px;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
}

.notice pre code,
.callout pre code {
    background-color: transparent !important;
    color: inherit;
}

/* Copy button inside notices - ensure it stays visible */
.notice .copy-code-btn,
.callout .copy-code-btn {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.notice .copy-code-btn i,
.callout .copy-code-btn i {
    color: white !important;
}

.notice .copy-code-btn:hover,
.callout .copy-code-btn:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Text/plaintext code blocks - darker text for output display */
pre code.language-text,
pre code.language-plaintext {
    color: #b0b0b0;
}

/* Inline code inside notices - consistent styling for both themes */
.notice code:not(pre code),
.callout code:not(pre code),
.notice-content code:not(pre code),
.callout-content code:not(pre code),
[data-theme="dark"] .notice code:not(pre code),
[data-theme="dark"] .callout code:not(pre code),
[data-theme="dark"] .notice-content code:not(pre code),
[data-theme="dark"] .callout-content code:not(pre code) {
    background-color: #e1e4e8 !important;
    color: #24292e !important;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .notice, .callout {
        padding: 0.75rem;
    }
    
    .notice-icon, .callout-icon {
        font-size: 1.25rem;
        margin-right: 0.75rem;
    }
    
    .notice-title {
        font-size: 1rem;
    }
    
    .notice pre,
    .callout pre {
        margin: 0;
        border-radius: 0;
    }
    
    .notice .highlight,
    .callout .highlight {
        margin: 0.5rem -0.75rem;
        border-radius: 0;
        width: calc(100% + 1.5rem);
    }
}

/* Dark theme expand block styles */
[data-theme="dark"] .expand-block {
    border-color: var(--border-color);
}

[data-theme="dark"] .expand-summary {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .expand-content {
    background-color: var(--bg-primary);
}

[data-theme="dark"] .expand-icon {
    color: var(--senzing-cyan);
}
