/* i2 Plugin - Interactive Paragraphs */

.i2-container {
    position: relative;
}

.i2-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
.i2-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.i2-icon {
    width: 32px;
    height: 32px;
    color: #9333ea;
    flex-shrink: 0;
}

.i2-title {
    font-size: 30px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .i2-title {
        font-size: 24px;
    }
}

.i2-description {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 16px;
    font-style: italic;
}

/* Content */
.i2-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.i2-paragraph-wrapper {
    position: relative;
}

.i2-paragraph {
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 16px;
    border-radius: 8px;
}

.i2-paragraph:hover {
    background-color: #f5f3ff;
}

.i2-paragraph p {
    font-size: 18px;
    color: #374151;
    line-height: 1.75;
    margin: 0;
}

.i2-paragraph-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.i2-paragraph-animating {
    animation: i2Dissolve 0.6s ease-out forwards;
}

@keyframes i2Dissolve {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0px);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.98);
        filter: blur(2px);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
        filter: blur(4px);
    }
}

/* Summary */
.i2-summary {
    background: linear-gradient(135deg, #f5f3ff 0%, #fce7f3 100%);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9d5ff;
    animation: i2FadeIn 0.5s ease-in forwards;
}

@keyframes i2FadeIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.i2-summary-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.i2-summary-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.i2-summary-text {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
}

.i2-answer-blank {
    color: #9333ea;
    font-weight: 700;
}

.i2-answer-correct {
    color: #15803d;
    font-weight: 700;
}

.i2-answer-wrong {
    color: #9333ea;
    font-weight: 700;
}

.i2-expand-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #9333ea;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    flex-shrink: 0;
}

.i2-expand-btn:hover {
    color: #6b21a8;
}

.i2-icon-small {
    width: 18px;
    height: 18px;
}

.i2-expanded-content {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9d5ff;
    animation: i2FadeIn 0.3s ease-in;
}

.i2-expanded-content p {
    font-size: 16px;
    color: #374151;
    line-height: 1.75;
    margin: 0;
}

/* Quiz Types */
.i2-quiz {
    margin-top: 16px;
}

/* Choice & True/False Quiz */
.i2-quiz-choice,
.i2-quiz-truefalse {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .i2-quiz-choice,
    .i2-quiz-truefalse {
        flex-direction: column;
    }
}

.i2-option-btn {
    flex: 1;
    background: white;
    border: 2px solid #c084fc;
    color: #1f2937;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.i2-option-btn:hover {
    background: #f5f3ff;
    border-color: #9333ea;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.i2-btn-true {
    border-color: #22c55e;
}

.i2-btn-true:hover {
    background: #f0fdf4;
    border-color: #16a34a;
}

.i2-btn-false {
    border-color: #ef4444;
}

.i2-btn-false:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

/* Text Quiz */
.i2-quiz-text {
    display: flex;
    gap: 12px;
    align-items: center;
}

@media (max-width: 640px) {
    .i2-quiz-text {
        flex-direction: column;
        align-items: stretch;
    }
}

.i2-text-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #c084fc;
    border-radius: 8px;
    font-size: 16px;
    color: #1f2937;
    transition: all 0.2s;
}

.i2-text-input:focus {
    outline: none;
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.i2-text-input::placeholder {
    color: #9ca3af;
}

.i2-submit-btn {
    background: #9333ea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.i2-submit-btn:hover {
    background: #7e22ce;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Match Quiz */
.i2-quiz-match {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.i2-match-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.i2-match-left {
    flex: 1;
    font-size: 16px;
    color: #374151;
    font-weight: 500;
}

.i2-match-input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #c084fc;
    border-radius: 8px;
    font-size: 16px;
    color: #1f2937;
    text-align: center;
    transition: all 0.2s;
}

.i2-match-input:focus {
    outline: none;
    border-color: #9333ea;
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

/* Footer */
.i2-footer {
    margin-top: 48px;
    padding: 24px;
    background: linear-gradient(135deg, #e9d5ff 0%, #dbeafe 100%);
    border-radius: 12px;
}

.i2-footer-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    margin: 0 0 8px 0;
}

.i2-footer-text {
    font-size: 18px;
    color: #374151;
    text-align: center;
    margin: 0;
}

/* Notifications */
.i2-notifications {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.i2-notification {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    animation: i2FadeIn 0.3s ease-in;
    min-width: 200px;
}

.i2-notification-success {
    background-color: #22c55e;
    color: white;
}

.i2-notification-error {
    background-color: #f97316;
    color: white;
}

.i2-notification span {
    font-weight: 600;
}

@keyframes i2FadeOut {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(20px);
    }
}
