/**
 * NoorIQuill Tutorial Section - Frontend Styles
 * نوریکویل بخش آموزش
 */

/* ===== Wrapper ===== */
.nq-tutorial-wrapper {
    direction: rtl;
    font-family: 'IRANSans', 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    margin: 20px 0;
    transition: box-shadow 0.3s ease;
}

.nq-tutorial-wrapper:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* ===== Header ===== */
.nq-tutorial-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.nq-header-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nq-header-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nq-header-text h3 {
    margin: 0 0 2px 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.6;
}

.nq-brand {
    font-size: 12px;
    opacity: 0.85;
    font-weight: 400;
}

.nq-header-status {
    flex-shrink: 0;
}

.nq-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.nq-status-unlocked {
    background: rgba(16, 185, 129, 0.2);
    color: #d1fae5;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.nq-status-locked {
    background: rgba(239, 68, 68, 0.2);
    color: #fecdd3;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===== Tutorial Body ===== */
.nq-tutorial-body {
    padding: 30px;
    background-color: #ffffff;
}

/* ===== Locked State ===== */
.nq-tutorial-locked-body {
    background-color: #fef3c7;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
}

.nq-locked-content {
    text-align: center;
    padding: 30px 20px;
}

.nq-lock-icon {
    margin-bottom: 20px;
}

.nq-lock-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 3px solid #f59e0b;
    animation: nq-pulse 2s ease-in-out infinite;
}

.nq-lock-circle svg {
    stroke: #f59e0b;
}

@keyframes nq-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 0 15px rgba(245, 158, 11, 0);
    }
}

.nq-lock-message {
    font-size: 17px;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 12px 0;
    line-height: 1.8;
}

.nq-login-message {
    font-size: 14px;
    color: #a16207;
    margin: 0 0 24px 0;
}

.nq-login-link {
    color: #6366f1;
    text-decoration: underline;
    font-weight: 600;
    margin-right: 5px;
    transition: color 0.2s;
}

.nq-login-link:hover {
    color: #4f46e5;
}

/* ===== Buy Button ===== */
.nq-buy-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #6366f1;
    color: #ffffff !important;
    padding: 14px 36px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.nq-buy-button:hover {
    background-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
    color: #ffffff !important;
}

.nq-buy-button:active {
    transform: translateY(0);
}

/* ===== Blurred Preview ===== */
.nq-blurred-preview {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #d97706;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.nq-blur-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
    opacity: 0.25;
    filter: blur(3px);
}

.nq-blur-long {
    width: 90%;
}

.nq-blur-medium {
    width: 65%;
}

.nq-blur-short {
    width: 40%;
}

/* ===== Text Content ===== */
.nq-text-content {
    line-height: 2;
    font-size: 15px;
}

.nq-text-content h1,
.nq-text-content h2,
.nq-text-content h3,
.nq-text-content h4,
.nq-text-content h5,
.nq-text-content h6 {
    margin-bottom: 12px;
    font-weight: 700;
}

.nq-text-content p {
    margin-bottom: 16px;
}

.nq-text-content ul,
.nq-text-content ol {
    padding-right: 20px;
    margin-bottom: 16px;
}

.nq-text-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

/* ===== Video ===== */
.nq-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin: 16px 0;
    background: #000;
}

.nq-video-container iframe,
.nq-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 12px;
}

.nq-video-player {
    max-width: 100%;
    border-radius: 12px;
}

/* ===== Tabs ===== */
.nq-tabs-wrapper {
    display: flex;
    gap: 0;
    min-height: 400px;
}

.nq-tabs-sidebar {
    width: 280px;
    flex-shrink: 0;
    border-left: 1px solid #e5e7eb;
    overflow-y: auto;
    max-height: 600px;
}

.nq-tab-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    cursor: pointer;
    border-bottom: 1px solid #e5e7eb;
    border-right: 4px solid transparent;
    background-color: #f9fafb;
    transition: all 0.2s ease;
}

.nq-tab-item:hover {
    background-color: #f3f4f6;
}

.nq-tab-item.active {
    background-color: #eef2ff;
    border-right-color: #6366f1;
}

.nq-tab-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #d1d5db;
    color: #4b5563;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.nq-tab-item.active .nq-tab-number {
    background-color: #6366f1;
    color: #ffffff;
}

.nq-tab-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.nq-tab-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nq-tab-duration {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
}

.nq-tabs-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    max-height: 600px;
}

.nq-tab-content {
    display: none;
}

.nq-tab-content.active {
    display: block;
    animation: nq-fadeIn 0.3s ease;
}

@keyframes nq-fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nq-tab-content-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.nq-tab-text-content {
    font-size: 15px;
    line-height: 2;
    color: #374151;
}

/* ===== Error State ===== */
.nq-tutorial-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    direction: rtl;
}

.nq-tutorial-error p {
    color: #dc2626;
    margin: 0;
    font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nq-tutorial-header {
        padding: 16px 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .nq-header-text h3 {
        font-size: 16px;
    }

    .nq-tutorial-body {
        padding: 20px;
    }

    .nq-tabs-wrapper {
        flex-direction: column;
    }

    .nq-tabs-sidebar {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid #e5e7eb;
        max-height: 200px;
        overflow-x: auto;
        overflow-y: hidden;
        display: flex;
        flex-direction: row;
    }

    .nq-tab-item {
        flex-direction: column;
        min-width: 140px;
        text-align: center;
        border-right: none;
        border-bottom: 4px solid transparent;
        padding: 12px 16px;
    }

    .nq-tab-item.active {
        border-bottom-color: #6366f1;
        border-right-color: transparent;
    }

    .nq-tab-info {
        align-items: center;
    }

    .nq-tab-title {
        white-space: normal;
        font-size: 13px;
    }

    .nq-tabs-content {
        padding: 16px;
        max-height: none;
    }

    .nq-lock-message {
        font-size: 15px;
    }

    .nq-lock-circle {
        width: 80px;
        height: 80px;
    }

    .nq-lock-circle svg {
        width: 36px;
        height: 36px;
    }

    .nq-buy-button {
        padding: 12px 28px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .nq-tutorial-header {
        padding: 14px 16px;
    }

    .nq-header-icon {
        display: none;
    }

    .nq-header-text h3 {
        font-size: 14px;
    }

    .nq-tutorial-body {
        padding: 16px;
    }

    .nq-tab-content-title {
        font-size: 17px;
    }
}
