/**
 * SRS AI ChatBot Formatter Styles
 * Styles for structured and formatted chatbot responses
 */

/* Base formatting classes */
.srs-message-type-formatted .srs-chatbot-message-content,
.srs-message-type-structured .srs-chatbot-message-content {
    line-height: 1.6;
}

/* Headers */
.srs-h1, .srs-h2, .srs-h3 {
    margin: 12px 0 8px 0;
    font-weight: 600;
    color: #2c3e50;
}

.srs-h1 { font-size: 1.4em; }
.srs-h2 { font-size: 1.25em; }
.srs-h3 { font-size: 1.1em; }

/* Text formatting */
.srs-bold { font-weight: 600; }
.srs-italic { font-style: italic; }
.srs-highlight { 
    background-color: #fff3cd; 
    padding: 1px 4px; 
    border-radius: 3px;
}

/* Code styling */
.srs-code-block {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin: 8px 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    line-height: 1.4;
}

.srs-inline-code {
    background-color: #f1f3f4;
    border-radius: 3px;
    padding: 2px 5px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

/* Lists */
.srs-formatted-list {
    margin: 8px 0;
    padding-left: 20px;
}

.srs-list-item {
    margin: 4px 0;
}

.srs-list-item-complex {
    margin: 8px 0;
}

.srs-list-item-complex strong {
    color: #2c3e50;
}

.srs-list-item-complex p {
    margin: 4px 0;
    color: #666;
}

/* Blockquotes */
.srs-blockquote {
    border-left: 4px solid #007cba;
    margin: 12px 0;
    padding: 8px 16px;
    background-color: #f8f9fa;
    font-style: italic;
    color: #555;
}

/* Links */
.srs-link {
    color: #007cba;
    text-decoration: underline;
}

.srs-link:hover {
    color: #005a87;
}

/* Structured Lists */
.srs-structured-list {
    margin: 12px 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.srs-list-title {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
}

/* Tables */
.srs-structured-table {
    margin: 12px 0;
}

.srs-table-title {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
}

.srs-formatted-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 0.9em;
}

.srs-formatted-table th,
.srs-formatted-table td {
    border: 1px solid #dee2e6;
    padding: 8px 12px;
    text-align: left;
}

.srs-formatted-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.srs-formatted-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Cards */
.srs-structured-card {
    margin: 12px 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}

.srs-card-header {
    background-color: #f8f9fa;
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
}

.srs-card-title {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
}

.srs-card-body {
    padding: 16px;
}

.srs-card-content {
    margin: 0 0 12px 0;
    color: #555;
}

.srs-card-field {
    margin: 8px 0;
    display: flex;
    align-items: center;
}

.srs-card-field strong {
    color: #2c3e50;
    margin-right: 8px;
    min-width: 80px;
}

.srs-card-actions {
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 8px;
}

.srs-card-button {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.srs-card-button:hover {
    background-color: #005a87;
}

/* Steps */
.srs-structured-steps {
    margin: 12px 0;
}

.srs-steps-title {
    margin: 0 0 16px 0;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
}

.srs-step-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

.srs-step-item {
    display: flex;
    margin: 16px 0;
    align-items: flex-start;
}

.srs-step-number {
    background-color: #007cba;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

.srs-step-content {
    flex: 1;
}

.srs-step-title {
    margin: 0 0 4px 0;
    color: #2c3e50;
    font-weight: 600;
}

.srs-step-description {
    margin: 0;
    color: #666;
    line-height: 1.4;
}

/* Quotes */
.srs-structured-quote {
    margin: 12px 0;
    text-align: center;
}

.srs-quote-content {
    border: none;
    background-color: transparent;
    font-style: italic;
    font-size: 1.1em;
    color: #2c3e50;
    margin: 0 0 8px 0;
    position: relative;
}

.srs-quote-content::before {
    content: '"';
    font-size: 2em;
    color: #007cba;
    position: absolute;
    left: -20px;
    top: -10px;
}

.srs-quote-content::after {
    content: '"';
    font-size: 2em;
    color: #007cba;
    position: absolute;
    right: -20px;
    bottom: -10px;
}

.srs-quote-author {
    color: #666;
    font-style: normal;
    font-size: 0.9em;
}

/* Special elements */
.srs-info-box, .srs-warning-box, .srs-success-box, .srs-error-box {
    margin: 12px 0;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid;
}

.srs-info-box {
    background-color: #e3f2fd;
    border-left-color: #2196f3;
    color: #0d47a1;
}

.srs-warning-box {
    background-color: #fff3e0;
    border-left-color: #ff9800;
    color: #e65100;
}

.srs-success-box {
    background-color: #e8f5e8;
    border-left-color: #4caf50;
    color: #1b5e20;
}

.srs-error-box {
    background-color: #ffebee;
    border-left-color: #f44336;
    color: #c62828;
}

.srs-action-button {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin: 4px 8px 4px 0;
    font-size: 0.9em;
}

.srs-action-button:hover {
    background-color: #005a87;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .srs-formatted-table {
        font-size: 0.8em;
    }
    
    .srs-formatted-table th,
    .srs-formatted-table td {
        padding: 6px 8px;
    }
    
    .srs-card-field {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .srs-card-field strong {
        margin-bottom: 4px;
    }
    
    .srs-step-item {
        flex-direction: column;
    }
    
    .srs-step-number {
        margin-bottom: 8px;
        margin-right: 0;
    }
}