/*-- scss:rules --*/

/* Custom CSS for Data Science with R Slides */

/* Main slide styling */
.reveal {
    background-color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Slide content spacing */
.reveal .slides section {
    padding: 15px;
    height: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: visible;
}

/* Title slide styling */
.reveal .slides section.title-slide h1 {
    color: #2E86C1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    font-size: 1.8em;
}

.reveal .slides section.title-slide h2 {
    color: #8E44AD;
    font-size: 1.1em;
}

/* Header styling */
.reveal h1, .reveal h2 {
    color: #2E86C1;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 0.3em;
    font-size: 1.3em;
    line-height: 1.2;
}

.reveal h1 {
    font-size: 1.4em;
}

.reveal h2 {
    font-size: 1.1em;
}

.reveal h3 {
    font-size: 0.95em;
    color: #8E44AD;
    margin-bottom: 0.2em;
}

.reveal h4 {
    font-size: 0.85em;
    color: #8E44AD;
}

/* Code block styling - with scrollbars for long code */
.reveal pre {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-left: 5px solid #31BAE9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-size: 0.65em;
    margin: 0.5em 0;
    max-height: 450px;
    overflow: auto;
    white-space: pre;
    word-wrap: normal;
    position: relative;
}

.callout pre {
    margin: 0;
    max-height: 380px;
    overflow: auto;
}

.reveal code {
    color: #d63384;
    background-color: #f8f9fa;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.85em;
}

/* Callout boxes styling */
.callout {
    border-radius: 10px;
    padding: 0.6em;
    margin: 0.3em 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 0.8em;
}

.callout-note {
    background-color: #e3f2fd;
    border-left: 5px solid #2196f3;
}

.callout-blue {
    background-color: #e3f2fd;
    border-left: 5px solid #2196f3;
}

.callout-tip {
    background-color: #e8f5e8;
    border-left: 5px solid #4caf50;
}

.callout-important {
    background-color: #fff3e0;
    border-left: 5px solid #ff9800;
}

.callout-warning {
    background-color: #fff8e1;
    border-left: 5px solid #ffc107;
}

/* Column layout styling */
.columns {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin: 0.3em 0;
}

.column {
    flex: 1;
    font-size: 0.8em;
    line-height: 1.4;
}

.column p, .column li, .column div {
    font-size: 0.8em;
    line-height: 1.4;
    margin: 0.3em 0;
}

.column h3, .column h4 {
    font-size: 0.9em;
    margin: 0.4em 0 0.2em 0;
}

/* Interactive tool styling */
.interactive-tool {
    padding: 12px;
    border: 2px solid #27AE60;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 0.7em;
    max-width: 1000px;
    margin: 10px auto;
}

.interactive-tool h3 {
    text-align: center;
    font-size: 1.2em;
    margin: 5px 0 10px 0;
    color: #27AE60;
}

.tool-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin: 10px 0;
}

.control-group {
    display: flex;
    flex-direction: column;
}

.control-group label {
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 4px;
}

.control-group select,
.control-group input {
    width: 100%;
    padding: 4px;
    font-size: 0.9em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.tool-output {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    font-size: 0.85em;
    max-height: 250px;
    overflow-y: auto;
    line-height: 1.3;
    position: relative;
}

/* Copy button styling */
.copy-button {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 12px;
    background: #27AE60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: bold;
    transition: all 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
}

.copy-button:hover {
    background: #229954;
    transform: scale(1.05);
}

.copy-button:active {
    transform: scale(0.95);
}

.copy-button.copied {
    background: #2196f3;
}

.tool-output-container {
    position: relative;
}

.tool-buttons {
    display: flex;
    gap: 8px;
    margin: 8px 0;
}

.tool-button {
    padding: 6px 16px;
    background: #27AE60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9em;
    transition: background 0.2s;
}

.tool-button:hover {
    background: #229954;
}

.tool-button.secondary {
    background: #3498db;
}

.tool-button.secondary:hover {
    background: #2980b9;
}

/* Custom scrollbar for code */
.reveal pre::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.reveal pre::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 5px;
}

.reveal pre::-webkit-scrollbar-thumb {
    background: #31BAE9;
    border-radius: 5px;
}

.reveal pre::-webkit-scrollbar-thumb:hover {
    background: #2196f3;
}

/* Link styling */
.reveal a {
    color: #2E86C1;
    text-decoration: none;
}

.reveal a:hover {
    color: #1B4F72;
    text-decoration: underline;
}

/* List styling */
.reveal ul li, .reveal ol li {
    margin-bottom: 0.2em;
    font-size: 0.85em;
    line-height: 1.3;
}

/* Custom color classes */
.blue-text { color: #2E86C1; }
.purple-text { color: #8E44AD; }
.green-text { color: #27AE60; }
.red-text { color: #E74C3C; }
.orange-text { color: #E67E22; }

/* Quiz/Challenge styling */
.quiz-box {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    font-size: 0.8em;
}

.quiz-question {
    font-weight: bold;
    color: #2E7D32;
    margin-bottom: 10px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-option {
    padding: 8px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-option:hover {
    background: #f1f8f4;
    border-color: #4caf50;
}

.quiz-option.correct {
    background: #c8e6c9;
    border-color: #4caf50;
}

.quiz-option.incorrect {
    background: #ffcdd2;
    border-color: #f44336;
}

.quiz-feedback {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
}

.quiz-feedback.correct {
    background: #c8e6c9;
    color: #2E7D32;
}

.quiz-feedback.incorrect {
    background: #ffcdd2;
    color: #c62828;
}
