/**
 * Custom CSS for Trafikko Frontend
 * 
 * Add your custom styles here.
 * This file is loaded after the main frontend.css,
 * so you can override default styles.
 * 
 * Example:
 * 
 * .scg-button {
 *     background-color: #your-color;
 * }
 * 
 * .scg-card {
 *     border-radius: 8px;
 * }
 */

/* Article Editor Styles */
.scg-article-edit-mode {
    margin-bottom: 20px;
}

/* WYSIWYG Editor Toolbar */
.scg-editor-toolbar {
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 10px;
    background: #f7fafc;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.scg-editor-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    transition: all 0.2s;
}

.scg-editor-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.scg-editor-btn:active {
    background: #e2e8f0;
}

.scg-editor-btn strong,
.scg-editor-btn em,
.scg-editor-btn u {
    font-weight: bold;
    font-style: normal;
    text-decoration: none;
}

/* WYSIWYG Editor Content */
.scg-wysiwyg-editor {
    min-height: 500px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 6px 6px;
    background: #fff;
    outline: none;
    line-height: 1.8;
    font-size: 16px;
    color: #2d3748;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.scg-wysiwyg-editor:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.scg-wysiwyg-editor h1,
.scg-wysiwyg-editor h2,
.scg-wysiwyg-editor h3,
.scg-wysiwyg-editor h4,
.scg-wysiwyg-editor h5,
.scg-wysiwyg-editor h6 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 600;
    line-height: 1.25;
}

.scg-wysiwyg-editor h1 {
    font-size: 2em;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5em;
}

.scg-wysiwyg-editor h2 {
    font-size: 1.5em;
}

.scg-wysiwyg-editor h3 {
    font-size: 1.25em;
}

.scg-wysiwyg-editor p {
    margin-bottom: 1em;
}

.scg-wysiwyg-editor ul,
.scg-wysiwyg-editor ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.scg-wysiwyg-editor li {
    margin-bottom: 0.5em;
}

.scg-wysiwyg-editor a {
    color: #4299e1;
    text-decoration: underline;
}

.scg-wysiwyg-editor a:hover {
    color: #2b6cb0;
}

.scg-wysiwyg-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1em 0;
}

.scg-article-preview-mode {
    margin-bottom: 20px;
}

.scg-article-content {
    padding: 20px;
    line-height: 1.8;
    color: #2d3748;
}

.scg-article-content h1,
.scg-article-content h2,
.scg-article-content h3,
.scg-article-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 600;
    line-height: 1.25;
}

.scg-article-content h1 {
    font-size: 2em;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5em;
}

.scg-article-content h2 {
    font-size: 1.5em;
}

.scg-article-content h3 {
    font-size: 1.25em;
}

.scg-article-content p {
    margin-bottom: 1em;
}

.scg-article-content ul,
.scg-article-content ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.scg-article-content li {
    margin-bottom: 0.5em;
}

.scg-article-content code {
    background: #f7fafc;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.9em;
}

.scg-article-content pre {
    background: #f7fafc;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1em;
}

.scg-article-content pre code {
    background: none;
    padding: 0;
}

.scg-article-content blockquote {
    border-left: 4px solid #4299e1;
    padding-left: 1em;
    margin-left: 0;
    color: #4a5568;
    font-style: italic;
}

.scg-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.scg-article-content table th,
.scg-article-content table td {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    text-align: left;
}

.scg-article-content table th {
    background: #f7fafc;
    font-weight: 600;
}

.scg-article-content a {
    color: #4299e1;
    text-decoration: none;
}

.scg-article-content a:hover {
    text-decoration: underline;
}

.scg-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1em 0;
}

/* Scores and Suggestions Panel */
.scg-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.scg-score-card {
    padding: 15px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.scg-score-label {
    font-size: 12px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.scg-score-value {
    font-size: 28px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.scg-score-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.scg-score-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
    transition: width 0.5s ease;
}

.scg-suggestions-section {
    margin-top: 20px;
}

.scg-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scg-suggestion-item {
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #cbd5e0;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.scg-suggestion-high {
    border-left-color: #fc8181;
    background: #fff5f5;
}

.scg-suggestion-medium {
    border-left-color: #f6ad55;
    background: #fffaf0;
}

.scg-suggestion-low {
    border-left-color: #90cdf4;
    background: #ebf8ff;
}

.scg-suggestion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.scg-suggestion-icon {
    font-size: 18px;
}

.scg-suggestion-title {
    flex: 1;
    font-size: 16px;
    color: #2d3748;
}

.scg-suggestion-priority {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #e2e8f0;
    color: #4a5568;
    font-weight: 600;
    text-transform: uppercase;
}

.scg-suggestion-high .scg-suggestion-priority {
    background: #fed7d7;
    color: #c53030;
}

.scg-suggestion-medium .scg-suggestion-priority {
    background: #feebc8;
    color: #c05621;
}

.scg-suggestion-low .scg-suggestion-priority {
    background: #bee3f8;
    color: #2c5282;
}

.scg-suggestion-message {
    color: #4a5568;
    line-height: 1.6;
    font-size: 14px;
}

/* Article Title Input */
#scg-article-title-input {
    font-size: 24px;
    font-weight: 600;
    padding: 8px 12px;
    border: 2px solid transparent;
    background: transparent;
    width: 100%;
    flex: 1;
    transition: all 0.2s;
}

#scg-article-title-input:hover {
    border-color: #e2e8f0;
    background: #f7fafc;
    border-radius: 4px;
}

#scg-article-title-input:focus {
    outline: none;
    border-color: #4299e1;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Add your custom styles below */

