/* Template Matching Guide Styles */

.template-guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.template-guide-overlay.hidden {
    display: none;
}

.template-guide-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    animation: guideSlideIn 0.3s ease-out;
    /* Centered by parent overlay's flexbox */
    margin: auto;
}

@keyframes guideSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.guide-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.guide-progress {
    flex: 1;
}

.guide-step-indicator {
    display: block;
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 8px;
    font-weight: 500;
}

.guide-progress-bar {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.guide-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.guide-close-btn {
    padding: 4px;
    background: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.guide-close-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

.guide-body {
    padding: 24px;
    flex: 1;
}

.guide-body h3 {
    margin: 0 0 16px 0;
    color: #212529;
    font-size: 1.25rem;
    font-weight: 600;
}

.guide-body p {
    margin: 0 0 12px 0;
    color: #495057;
    line-height: 1.6;
    font-size: 0.95rem;
}

.guide-body p:last-child {
    margin-bottom: 0;
}

.guide-body ul,
.guide-body ol {
    margin: 12px 0;
    padding-left: 24px;
    color: #495057;
    line-height: 1.6;
}

.guide-body li {
    margin-bottom: 8px;
}

.guide-body li:last-child {
    margin-bottom: 0;
}

.guide-body strong {
    color: #212529;
    font-weight: 600;
}

.guide-note {
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-left: 3px solid #667eea;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #495057;
}

.guide-note strong {
    color: #212529;
}

.guide-footer {
    padding: 20px 24px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.guide-actions {
    display: flex;
    gap: 12px;
}

.guide-actions .btn {
    min-width: 100px;
}

/* Highlight effect for target elements */
.guide-highlight {
    position: relative;
    z-index: 10000;
}

/* Responsive design */
@media (max-width: 768px) {
    .template-guide-overlay {
        padding: 10px;
    }

    .template-guide-card {
        max-width: 100%;
        max-height: 95vh;
    }

    .guide-header {
        padding: 16px 20px;
    }

    .guide-body {
        padding: 20px;
    }

    .guide-body h3 {
        font-size: 1.1rem;
    }

    .guide-footer {
        padding: 16px 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .guide-actions {
        width: 100%;
        justify-content: space-between;
    }

    .guide-actions .btn {
        flex: 1;
    }
}

