/* Phase 3-11: 상세 가이드 전용 공통 스타일 (Level 3) */

.guide-l3-content,
.guide-article {
    font-family: Pretendard, sans-serif;
}

.guide-l3-content .min-h-screen {
    min-height: 100vh;
}

.guide-l3-content .bg-white {
    background-color: #ffffff;
}

.guide-l3-content .max-w-1200,
.guide-article {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-xl {
    font-size: 1.2rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-6 {
    margin-bottom: 1.5rem !important;
}

.mb-8 {
    margin-bottom: 2rem !important;
}

.mb-10 {
    margin-bottom: 2.5rem !important;
}

.mb-12 {
    margin-bottom: 3rem !important;
}

.mb-15 {
    margin-bottom: 3.75rem !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-5 {
    margin-top: 1.25rem;
}

.mt-10 {
    margin-top: 2.5rem;
}

.mt-15 {
    margin-top: 3.75rem;
}

.pt-1 {
    padding-top: 0.25rem;
}

.pt-5 {
    padding-top: 1.25rem;
}

.pt-8 {
    padding-top: 2rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

/* Toctree 관련 스타일 Start */
a {
    color: #2980B9;
    text-decoration: none;
    cursor: pointer
}

ul,
ol,
dl {
    margin: 0;
    padding: 0;
    list-style: none;
    list-style-image: none
}

li {
    list-style: none
}

.toctree-l1>span {
    color: #3b3b3b !important;
    font-weight: 600;
    font-size: 1.2em;
}

body[data-theme='dark'] .toctree-l1>span {
    color: #dbdbdb !important;
}

.toctree-wrapper .toctree-l1>a>span {
    margin-top: 0.5em;
    margin-bottom: 0.15em;
    color: #2980B9 !important;
    font-weight: 600;
    font-size: 1.2em;
}

.toctree-wrapper .toctree-l1>a {
    margin-bottom: 0.15em;
    color: #2980B9 !important;
    font-weight: 600;
}

body[data-theme='dark'] .toctree-wrapper .toctree-l1>a>span {
    color: #64c1ff !important;
}

.toctree-wrapper * a {
    display: grid;
    grid-template-columns: minmax(180px, 320px) 1fr;
    column-gap: 20px;
    align-items: start;

    width: 95%;
    text-indent: 0;
    padding-top: 0.2em;
    padding-bottom: 0.1em;
    line-height: 1.25em;
}

.toctree-wrapper * ul {
    padding-left: 2em;
    border-top: solid #ececec 1px;
    margin-left: -1em;
}

body[data-theme='dark'] .toctree-wrapper * ul {
    border-top-color: #334155 !important;
}

.toctree-wrapper>ul {
    margin-left: 0em
}

.rst-content .toctree-wrapper ul li ul {
    margin-bottom: 0.75em;
    padding-top: 0.5em;
    margin-top: 0.5em;
}

.rst-content .toctree-wrapper ul li a:hover span {
    color: #25afef !important;
}

body[data-theme='dark'] .rst-content .toctree-wrapper ul li a:hover span {
    color: #60a5fa !important;
}

.rst-content .toctree-wrapper ul li a:visited:hover span {
    color: #C961DA !important;
}

.toctree-wrapper .toctree-l1>a:hover span {
    color: #25afef !important;
}

body[data-theme='dark'] .toctree-wrapper .toctree-l1>a:hover span {
    color: #00e5ff !important;
}

.menu-title {
    font-weight: 600;
    color: #2980B9;
}

body[data-theme='dark'] .menu-title {
    color: #94a3b8 !important;
}

.menu-desc {
    color: #666;
    font-size: 0.95em;
    line-height: 1.45;
}

body[data-theme='dark'] .menu-desc {
    color: #94a3b8 !important;
}

.rst-content .toctree-wrapper ul li a:hover .menu-title,
.rst-content .toctree-wrapper ul li a:hover .menu-desc {
    color: #25afef !important;
}

body[data-theme='dark'] .rst-content .toctree-wrapper ul li a:hover .menu-title,
body[data-theme='dark'] .rst-content .toctree-wrapper ul li a:hover .menu-desc {
    color: #00e5ff !important;
}

.rst-content .toctree-wrapper ul li a:visited:hover .menu-desc {
    color: #C961DA !important;
}

.toctree-wrapper li.is-info .menu-title,
.toctree-wrapper li.is-info .menu-desc {
    color: #64748b !important;
}

.rst-content .toctree-wrapper ul li.is-info a:hover .menu-title,
.rst-content .toctree-wrapper ul li.is-info a:hover .menu-desc {
    color: #475569 !important;
}

body[data-theme='dark'] .toctree-wrapper li.is-info .menu-title,
body[data-theme='dark'] .toctree-wrapper li.is-info .menu-desc {
    color: #64748b !important;
}

body[data-theme='dark'] .rst-content .toctree-wrapper ul li.is-info a:hover .menu-title,
body[data-theme='dark'] .rst-content .toctree-wrapper ul li.is-info a:hover .menu-desc {
    color: #94a3b8 !important;
}

@media (max-width: 768px) {
    .toctree-wrapper * a {
        grid-template-columns: 1fr;
        row-gap: 4px;
    }

    .menu-desc {
        font-size: 0.92em;
    }
}

.toctree-wrapper .toctree-l1>a {
    font-size: 104%;
    padding-bottom: 0.35em;
}

.toctree-wrapper .toctree-l2>a {
    font-size: 102%
}

.toctree-wrapper .toctree-l3>a {
    font-size: 100%
}

.toctree-wrapper .toctree-l1>ul {
    border-color: #bfbfbf
}

.toctree-wrapper .toctree-l2>ul {
    border-color: #e1e0e0
}

.toctree-wrapper .toctree-l3>ul {
    border-color: #ececec
}

.rst-content .toctree-wrapper ul li,
.rst-content .toctree-wrapper ul li li,
.rst-content .toctree-wrapper ul li li li {
    list-style-type: none;
    margin-left: 0px;
}

/* Toctree 관련 스타일 End */

.step-link {
    font-weight: 700;
    color: #2980B9 !important;
    transition: all 0.2s ease;
}

.step-link:hover {
    color: #25afef !important;
    text-decoration: none;
}

body[data-theme='dark'] .step-link {
    color: #94a3b8 !important;
}

body[data-theme='dark'] .step-link:hover {
    color: #00e5ff !important;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-900 {
    color: #111827;
}

.text-white {
    color: #ffffff !important;
}

.text-red-600 {
    color: #dc2626 !important;
}

.text-blue-600 {
    color: #2563eb !important;
}


.bg-blue-600 {
    background-color: #2563eb;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-300 {
    background-color: #d1d5db;
}

.bg-gray-400 {
    background-color: #9ca3af;
}

.border {
    border-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

.border-t-2 {
    border-top-width: 2px;
}

.border-l-4 {
    border-left-width: 4px;
}

.border-dashed {
    border-top-style: dashed;
    border-top-width: 1px;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.border-blue-500 {
    border-color: #3b82f6;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.w-3 {
    width: 0.75rem;
}

.h-3 {
    height: 0.75rem;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.w-8 {
    width: 2rem;
}


.h-8 {
    height: 2rem;
}

.w-12 {
    width: 3rem;
}

.h-6 {
    height: 1.5rem;
}

.w-full {
    width: 100%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.flex-1 {
    flex: 1 1 0%;
}

.inline-flex {
    display: inline-flex;
}

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

.leading-relaxed {
    line-height: 1.625;
    text-decoration: none;
}

.hover\:bg-blue-700:hover {
    background-color: #1d4ed8;
}

.hover\:bg-gray-50:hover {
    background-color: #f9fafb;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

.lucide {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.guide-l3-content h1,
.guide-l3-content h2,
.guide-l3-content h3,
.guide-l3-content h4,
.guide-article h1,
.guide-article h2,
.guide-article h3,
.guide-article h4 {
    margin: 0;
}

/* Phase 3-12: Functional Section Header & Mini Buttons */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 0.75rem;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    /* Default light border matching var(--guide-border) */
}

.section-header .section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: #1a1f27;
}

/* Square Mini-Action Button (Theme Toggle style) */
.btn-mini-square {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #64748b;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-mini-square:hover {
    color: #2980B9;
    border-color: #2980B9;
    background: rgba(41, 128, 185, 0.05);
    transform: translateY(-2px);
}

/* Dark Mode adaptation */
body[data-theme='dark'] .section-header {
    border-bottom-color: #334155 !important;
}

body[data-theme='dark'] .section-header .section-title {
    color: var(--text) !important;
}

body[data-theme='dark'] .btn-mini-square {
    background: var(--pager-card-bg);
    border-color: var(--line);
    color: #94a3b8;
}

body[data-theme='dark'] .btn-mini-square:hover {
    color: #00e5ff;
    border-color: #00e5ff;
    background: rgba(0, 229, 255, 0.1);
}

/* Step Badge Style */
.badge-step {
    min-width: 70px;
    height: 28px;
    padding: 2px 12px;
    border-radius: 99px;
    /* Pill shape to prevent "pointy" look */
    font-size: 0.75rem;
    line-height: normal;
    letter-spacing: -0.02em;
}

/* Phase 3-13: Mini Direct Link & Tooltip (말풍선) */
.btn-direct-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #64748b;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
    line-height: normal;
    /* Reset line-height */
}

.btn-direct-mini svg {
    width: 12px;
    height: 12px;
    display: block;
    /* Ensure no baseline alignment issues */
}

.btn-direct-mini:hover {
    color: #2980B9;
    border-color: #2980B9;
    background: rgba(41, 128, 185, 0.05);
    transform: translateY(-2px);
}

body[data-theme='dark'] .btn-direct-mini {
    background: var(--pager-card-bg);
    border-color: var(--line);
    color: #94a3b8;
}

body[data-theme='dark'] .btn-direct-mini:hover {
    color: #00e5ff;
    border-color: #00e5ff;
    background: rgba(0, 229, 255, 0.1);
}

/* Tooltip (말풍선) Style */
[data-tooltip] {
    position: relative;
    /* Removed display: inline-block; to prevent breaking flex containers */
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -8px);
    padding: 6px 12px;
    background: #1e293b;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tooltip Arrow */
[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, 2px);
    border-width: 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

[data-tooltip]:hover::before {
    transform: translate(-50%, -10px);
}

[data-tooltip]:hover::after {
    transform: translate(-50%, 0);
}

body[data-theme='dark'] [data-tooltip]::before {
    background: #334155;
    color: #f9fafb;
}

body[data-theme='dark'] [data-tooltip]::after {
    border-color: #334155 transparent transparent transparent;
}

/* Phase 3-14: Tip Box 전역 스타일 */
.tip-box {
    position: relative;
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: #f0f9ff;
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    overflow: hidden;
}

body[data-theme='dark'] .tip-box {
    background: rgba(59, 130, 246, 0.1) !important;
    border-left-color: #3b82f6 !important;
}

.tip-box-label {
    flex-shrink: 0;
    width: 3rem;
    height: 1.5rem;
    background: #004a87;
    color: #ffffff !important;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

body[data-theme='dark'] .tip-box-label {
    background: #3b82f6;
}

.tip-box-content {
    flex: 1;
    color: #374151;
    font-size: 1rem;
    line-height: 1.625;
}

body[data-theme='dark'] .tip-box-content {
    color: #cbd5e1 !important;
}

.tip-box-content p {
    margin: 0 !important;
}

.tip-box>* {
    position: relative;
    z-index: 1;
}

.tip-box--with-character {
    position: relative;
    overflow: hidden;
}

.tip-box--with-character::after {
    content: "";
    position: absolute;
    right: -3.5rem;
    top: 120%;
    transform: translateY(-50%);
    width: clamp(180px, 28vw, 340px);
    height: clamp(180px, 28vw, 340px);
    background: url("../images/lineart-character-tipbox.svg") no-repeat center / contain;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}