/* ============================================
   DevOps Guides Stylesheet
   Shared CSS classes for Docker, Git, AWS guides
   Uses dv- prefix (devops-modal)
   ============================================ */

/* --- Info Boxes / Callouts --- */

.guide-info-box-dv {
    background-color: rgba(135, 206, 235, 0.1);
    padding: 12px;
    border-left: 3px solid #87ceeb;
    margin: 15px 0;
}
.guide-info-box-dv p:first-child {
    margin: 0;
    font-size: 0.9em;
}
.guide-warning-box-dv {
    background-color: rgba(255, 165, 0, 0.1);
    padding: 12px;
    border-left: 3px solid #ffa500;
    margin: 15px 0;
}
.guide-warning-box-dv p:first-child {
    margin: 0;
    font-size: 0.9em;
}
.guide-success-box-dv {
    background-color: rgba(0, 255, 65, 0.1);
    padding: 12px;
    border-left: 3px solid #00ff41;
    margin: 15px 0;
}
.guide-danger-box-dv {
    background-color: rgba(255, 68, 68, 0.1);
    padding: 12px;
    border-left: 3px solid #ff4444;
    margin: 15px 0;
}

/* --- Structured Sections (collapsible) --- */
/* prefix: dv- (devops-modal) */

.dv-description { font-size: 0.92rem; opacity: 0.85; margin: 4px 0 8px; line-height: 1.5; }

.dv-section {
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 7px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.dv-section.expanded { border-color: rgba(59, 130, 246, 0.4); }

.dv-section-header {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; cursor: pointer; user-select: none;
    transition: background 0.15s;
}
[data-md-color-scheme="slate"] .dv-section-header { background: rgba(255,255,255,0.04); }
[data-md-color-scheme="light"] .dv-section-header,
[data-md-color-scheme="default"] .dv-section-header { background: rgba(0,0,0,0.03); }
.dv-section-header:hover { background: rgba(59, 130, 246, 0.12); }

.dv-arrow { font-size: 16px; width: 18px; text-align: center; flex-shrink: 0; }
.dv-section-title { font-weight: 600; font-size: 1rem; }

.dv-section-body { padding: 14px 18px 18px; line-height: 1.65; }
.dv-section-body h5 { margin-top: 18px; margin-bottom: 6px; font-size: 0.95rem; color: #3b82f6; }
.dv-section-body pre { margin: 8px 0 14px; border-radius: 5px; overflow-x: auto; }
.dv-section-body code {
    display: block; white-space: pre;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem; padding: 12px 14px;
    border-radius: 5px; line-height: 1.55;
}
[data-md-color-scheme="slate"] .dv-section-body code { background: #141e27; color: #c9d8e6; }
[data-md-color-scheme="light"] .dv-section-body code,
[data-md-color-scheme="default"] .dv-section-body code { background: #eef1f5; color: #1e2a35; }
.dv-section-body ul { padding-left: 20px; line-height: 1.8; }
.dv-section-body li { margin-bottom: 4px; }

/* --- Three-tier code comment styling --- */
/* Tier 1: Step/command labels (# Step X.X: ...) */
/* Tier 2: Annotations (# Purpose: ...)          */
/* Tier 3: General comments (# ...)              */

.dv-code-step-label {
    display: inline-block; width: 100%; font-weight: 700;
    letter-spacing: 0.02em;
    border-top: 1px solid rgba(128,128,128,0.18);
    margin-top: 2px; padding-top: 10px;
}
pre code .dv-code-step-label:first-child { border-top: none; margin-top: 0; padding-top: 0; }

.dv-code-annotation { display: inline-block; width: 100%; font-style: italic; opacity: 0.92; }
.dv-code-comment    { display: inline-block; width: 100%; font-style: italic; opacity: 0.72; }

/* Dark mode */
[data-md-color-scheme="slate"] .dv-code-step-label { color: #60a5fa; border-top-color: rgba(255,255,255,0.08); }
[data-md-color-scheme="slate"] .dv-code-annotation  { color: #34d399; }
[data-md-color-scheme="slate"] .dv-code-comment      { color: #637788; }

/* Light mode */
[data-md-color-scheme="light"] .dv-code-step-label,
[data-md-color-scheme="default"] .dv-code-step-label { color: #1d4ed8; border-top-color: rgba(0,0,0,0.10); }
[data-md-color-scheme="light"] .dv-code-annotation,
[data-md-color-scheme="default"] .dv-code-annotation  { color: #047857; }
[data-md-color-scheme="light"] .dv-code-comment,
[data-md-color-scheme="default"] .dv-code-comment      { color: #8494a7; }

/* Responsive */
@media (max-width: 768px) {
    .dv-section-header { padding: 10px 12px; }
    .dv-section-body   { padding: 10px 12px 14px; }
}


/* ============================================
   Deep Dive Overlay  (dd- prefix)
   Full-screen panel for in-depth guides
   ============================================ */

.btn-deep-dive {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-deep-dive:hover {
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    box-shadow: 0 0 8px rgba(26, 115, 232, 0.5);
}

#dd-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.25s ease;
}
#dd-overlay.dd-visible { opacity: 1; }

#dd-panel {
    position: fixed;
    top: 3vh; left: 3vw;
    width: 94vw; height: 94vh;
    border-radius: 12px;
    z-index: 10001;
    display: flex; flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#dd-panel.dd-visible {
    opacity: 1;
    transform: translateY(0);
}
[data-md-color-scheme="slate"] #dd-panel {
    background: #1e1e2e; color: #cdd6f4;
}
[data-md-color-scheme="light"] #dd-panel,
[data-md-color-scheme="default"] #dd-panel {
    background: #fff; color: #222;
}

body.dd-no-scroll { overflow: hidden !important; }

.dd-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(128,128,128,0.2);
}
.dd-header h3 { margin: 0; font-size: 1.15rem; }
.dd-close {
    font-size: 1.6rem; cursor: pointer;
    color: inherit; opacity: 0.6;
    line-height: 1;
}
.dd-close:hover { color: #ff4444; }

.dd-body {
    flex: 1; overflow-y: auto;
    padding: 16px 20px 24px;
}
.dd-description { font-size: 0.92rem; opacity: 0.85; margin: 4px 0 8px; line-height: 1.5; }
.dd-divider { border: none; border-top: 1px solid rgba(128,128,128,0.2); margin: 12px 0; }

.dd-section {
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 7px;
    margin-bottom: 10px;
    overflow: hidden;
}
.dd-section.expanded { border-color: rgba(26,115,232,0.3); }
.dd-section-header {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 14px;
    cursor: pointer; user-select: none;
}
[data-md-color-scheme="slate"] .dd-section-header { background: rgba(255,255,255,0.04); }
[data-md-color-scheme="light"] .dd-section-header,
[data-md-color-scheme="default"] .dd-section-header { background: rgba(0,0,0,0.03); }
.dd-section-header:hover { background: rgba(26,115,232,0.08); }
.dd-arrow { font-size: 0.9rem; color: #1a73e8; min-width: 14px; }
.dd-section-title { font-weight: 600; font-size: 0.95rem; }
.dd-section-body { padding: 12px 16px 16px; line-height: 1.6; }

.dd-section-body h5 {
    margin: 14px 0 6px;
    font-size: 0.93rem;
    color: #1a73e8;
}
.dd-section-body pre {
    border-radius: 6px; padding: 10px 12px;
    overflow-x: auto; font-size: 0.82rem;
}
.dd-section-body code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.82rem;
}
[data-md-color-scheme="slate"] .dd-section-body code { background: rgba(0,0,0,0.3); }
[data-md-color-scheme="light"] .dd-section-body code,
[data-md-color-scheme="default"] .dd-section-body code { background: rgba(0,0,0,0.05); }

@media (max-width: 768px) {
    #dd-panel { top: 1vh; left: 1vw; width: 98vw; height: 98vh; }
    .dd-header { padding: 10px 14px; }
    .dd-body   { padding: 12px 14px 18px; }
    .dd-section-header { padding: 10px 12px; }
}


/* ============================================
   Examples Floating Panel  (de- prefix)
   Compact card for practical examples
   ============================================ */

.btn-examples {
    background: linear-gradient(135deg, #00897b, #00695c);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.btn-examples:hover {
    background: linear-gradient(135deg, #00a693, #00796b);
    box-shadow: 0 0 8px rgba(0, 137, 123, 0.5);
}

.de-panel {
    position: fixed;
    z-index: 10002;
    width: 500px; max-width: 94vw;
    max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.de-panel.de-visible {
    opacity: 1; transform: translateY(0);
}
[data-md-color-scheme="slate"] .de-panel { background: #1e1e2e; color: #cdd6f4; }
[data-md-color-scheme="light"] .de-panel,
[data-md-color-scheme="default"] .de-panel { background: #fff; color: #222; }

.de-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(128,128,128,0.2);
}
.de-title { font-weight: 700; font-size: 0.95rem; }
.de-close {
    font-size: 1.4rem; cursor: pointer;
    color: inherit; opacity: 0.6;
    line-height: 1;
}
.de-close:hover { color: #ff4444; }

.de-body {
    overflow-y: auto;
    max-height: calc(70vh - 48px);
    padding: 10px 14px 16px;
}
.de-desc { font-size: 0.88rem; opacity: 0.8; margin: 0 0 10px; line-height: 1.45; }

.de-category-group {
    margin-bottom: 14px;
}
.de-category-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(128,128,128,0.15);
}
.de-items { padding-left: 4px; }

.de-item {
    margin-bottom: 10px;
    padding: 6px 8px;
    border-radius: 5px;
    background: rgba(128,128,128,0.05);
}
.de-item-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
}
pre.de-code {
    margin: 4px 0;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    overflow-x: auto;
}
[data-md-color-scheme="slate"] pre.de-code { background: rgba(0,0,0,0.3); }
[data-md-color-scheme="light"] pre.de-code,
[data-md-color-scheme="default"] pre.de-code { background: rgba(0,0,0,0.05); }

pre.de-code code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.78rem;
}
.de-item-desc {
    display: block;
    font-size: 0.82rem;
    opacity: 0.75;
    font-style: italic;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .de-panel { width: 96vw; max-height: 80vh; }
    .de-body  { max-height: calc(80vh - 48px); }
}
