/**
 * Tutorial System Styles
 * Google-style spotlight modals with arrow pointers
 * 
 * Note: Responsive styles in responsive.css, animations in core.css
 */

/* ============================================
   TUTORIAL TRIGGER BUTTON
   ============================================ */
.ott-tutorial-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-left: 6px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--primary, #6b46c1);
    opacity: 0.7;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.ott-tutorial-trigger:hover {
    opacity: 1;
    background: rgba(107, 70, 193, 0.1);
    transform: scale(1.1);
}

.ott-tutorial-trigger:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.3);
}

.ott-tutorial-trigger svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   TUTORIAL OVERLAY
   ============================================ */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tutorial-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Spotlight cutout effect */
.tutorial-spotlight {
    position: fixed;
    z-index: 99999;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    pointer-events: none;
    transition: all 0.3s ease;
    display: none;
}

/* ============================================
   TUTORIAL MODAL
   ============================================ */
.tutorial-modal {
    position: fixed;
    z-index: 100000;
    width: 90%;
    max-width: 480px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.tutorial-modal.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Modal Header */
.tutorial-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--border-gray, #e2e8f0);
}

.tutorial-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary, #1a202c);
    line-height: 1.3;
    padding-right: 1rem;
}

.tutorial-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted, #718096);
    transition: all 0.2s;
    flex-shrink: 0;
}

.tutorial-close:hover {
    background: var(--bg-light, #f7fafc);
    color: var(--text-primary, #1a202c);
}

.tutorial-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.3);
}

/* Modal Content */
.tutorial-content {
    padding: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary, #4a5568);
    max-height: 50vh;
    overflow-y: auto;
}

.tutorial-content p {
    margin: 0 0 0.75rem;
}

.tutorial-content p:last-child {
    margin-bottom: 0;
}

.tutorial-content ul,
.tutorial-content ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.tutorial-content li {
    margin-bottom: 0.5rem;
}

.tutorial-content strong {
    color: var(--text-primary, #1a202c);
}

/* Highlight boxes in content */
.tutorial-highlight {
    margin: 1rem 0;
    padding: 0.875rem 1rem;
    background: #f0f9ff;
    border-left: 3px solid #3b82f6;
    border-radius: 0 6px 6px 0;
}

.tutorial-highlight-success {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

.tutorial-highlight-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.tutorial-highlight-purple {
    background: #faf5ff;
    border-left-color: var(--primary, #6b46c1);
}

/* Modal Footer */
.tutorial-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-gray, #e2e8f0);
    background: var(--bg-light, #f7fafc);
    border-radius: 0 0 12px 12px;
}

/* Step indicator */
.tutorial-steps {
    font-size: 0.8125rem;
    color: var(--text-muted, #718096);
}

.tutorial-steps-dots {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.tutorial-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-gray-dark, #cbd5e0);
    transition: all 0.2s;
}

.tutorial-step-dot.active {
    background: var(--primary, #6b46c1);
    transform: scale(1.2);
}

.tutorial-step-dot.completed {
    background: var(--success, #48bb78);
}

/* Buttons container */
.tutorial-actions {
    display: flex;
    gap: 0.75rem;
}

/* ============================================
   TUTORIAL BUTTONS
   ============================================ */
.tutorial-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
    white-space: nowrap;
    text-decoration: none;
    border: 2px solid transparent;
}

.tutorial-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.2);
}

.tutorial-btn-primary {
    background: linear-gradient(135deg, var(--primary, #6b46c1) 0%, var(--primary-hover, #805ad5) 100%);
    color: white;
    border-color: transparent;
}

.tutorial-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.tutorial-btn-secondary {
    background: white;
    color: var(--text-secondary, #4a5568);
    border: 2px solid var(--border-gray-dark, #cbd5e0);
}

.tutorial-btn-secondary:hover {
    background: var(--bg-light, #f7fafc);
    border-color: var(--text-muted, #718096);
}

.tutorial-btn-text {
    background: transparent;
    color: var(--text-muted, #718096);
    border: none;
    padding: 0.5rem 0.75rem;
    min-height: auto;
}

.tutorial-btn-text:hover {
    color: var(--text-primary, #1a202c);
}

/* ============================================
   ARROW POINTERS
   ============================================ */
.tutorial-arrow {
    position: absolute;
    width: 0;
    height: 0;
}

/* Arrow pointing up (modal below target) */
.tutorial-modal.position-bottom .tutorial-arrow {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid white;
}

/* Arrow pointing down (modal above target) */
.tutorial-modal.position-top .tutorial-arrow {
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 12px solid white;
}

/* Arrow pointing right (modal to left of target) */
.tutorial-modal.position-left .tutorial-arrow {
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 12px solid white;
}

/* Arrow pointing left (modal to right of target) */
.tutorial-modal.position-right .tutorial-arrow {
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-right: 12px solid white;
}

/* Adjust arrow shadow */
.tutorial-arrow::before {
    content: '';
    position: absolute;
}

/* ============================================
   HELPFUL VOTING SECTION
   ============================================ */
.tutorial-voting {
    display: none;
    padding: 1rem 1.25rem;
    text-align: center;
    border-top: 1px solid var(--border-gray, #e2e8f0);
    background: var(--bg-light, #f7fafc);
    border-radius: 0 0 12px 12px;
}

.tutorial-voting.active {
    display: block;
}

.tutorial-voting-question {
    margin: 0 0 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary, #1a202c);
}

.tutorial-voting-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.tutorial-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    border: 2px solid var(--border-gray-dark, #cbd5e0);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
}

.tutorial-vote-btn:hover {
    border-color: var(--primary, #6b46c1);
}

.tutorial-vote-btn.vote-helpful:hover {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #16a34a;
}

.tutorial-vote-btn.vote-not-helpful:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.tutorial-vote-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.2);
}

/* Voting feedback states */
.tutorial-voting-thanks {
    display: none;
    padding: 0.75rem;
    color: var(--success, #16a34a);
    font-weight: 500;
}

.tutorial-voting-thanks.active {
    display: block;
}

.tutorial-voting-feedback {
    display: none;
    margin-top: 0.75rem;
}

.tutorial-voting-feedback.active {
    display: block;
}

.tutorial-voting-feedback p {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted, #718096);
}
