/**
 * Result Display - Shared Styles for AI Tools
 * Provides consistent styling for all AI-generated content
 */

/* Main result container */
.result-display {
    background: #1a1a1a;
    padding: 25px;
    border-radius: 8px;
    line-height: 1.6;
    color: #e0e0e0;
    text-align: left;
    max-height: 600px;
    overflow-y: auto;
}

/* Custom scrollbar */
.result-display::-webkit-scrollbar {
    width: 10px;
}

.result-display::-webkit-scrollbar-track {
    background: #222;
    border-radius: 5px;
}

.result-display::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 5px;
}

.result-display::-webkit-scrollbar-thumb:hover {
    background: #ff8855;
}

/* Typography - Headers */
.result-display h1,
.result-display h2,
.result-display h3,
.result-display h4,
.result-display h5,
.result-display h6 {
    color: #ff6b35;
    text-align: left;
    font-weight: 600;
}

.result-display h1 {
    font-size: 1.8em;
    margin: 25px 0 15px 0;
}

.result-display h2 {
    font-size: 1.5em;
    margin: 25px 0 12px 0;
    border-bottom: 2px solid rgba(255, 107, 53, 0.3);
    padding-bottom: 8px;
}

.result-display h3 {
    font-size: 1.2em;
    margin: 18px 0 10px 0;
    color: #ff8855;
}

.result-display h4 {
    font-size: 1.1em;
    margin: 15px 0 8px 0;
    color: #ffa575;
}

.result-display h5,
.result-display h6 {
    font-size: 1em;
    margin: 12px 0 6px 0;
    color: #ffb896;
}

/* Typography - Paragraphs */
.result-display p {
    margin: 0 0 12px 0;
    line-height: 1.6;
    text-align: left;
}

/* Lists */
.result-display ul,
.result-display ol {
    margin: 8px 0 12px 25px;
    padding-left: 0;
    text-align: left;
}

.result-display li {
    margin-bottom: 6px;
    line-height: 1.5;
    text-align: left;
}

.result-display ul ul,
.result-display ol ol,
.result-display ul ol,
.result-display ol ul {
    margin-top: 4px;
    margin-bottom: 4px;
}

/* Text formatting */
.result-display strong {
    color: #ff8855;
    font-weight: 600;
}

.result-display em {
    font-style: italic;
    color: #e0e0e0;
}

.result-display code {
    background: rgba(255, 107, 53, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    color: #ffa575;
    font-size: 0.9em;
}

.result-display pre {
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto;
    margin: 12px 0;
}

.result-display pre code {
    background: none;
    padding: 0;
    color: #e0e0e0;
    font-size: 0.85em;
}

/* Blockquotes */
.result-display blockquote {
    border-left: 4px solid #ff6b35;
    padding-left: 15px;
    margin: 15px 0 15px 10px;
    color: #ccc;
    font-style: italic;
}

/* Links */
.result-display a {
    color: #ff6b35;
    text-decoration: none;
    transition: color 0.2s ease;
}

.result-display a:hover {
    color: #ff8855;
    text-decoration: underline;
}

/* Horizontal rules */
.result-display hr {
    border: none;
    border-top: 2px solid rgba(255, 107, 53, 0.3);
    margin: 20px 0;
}

/* Tables */
.result-display table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.9em;
}

.result-display th,
.result-display td {
    padding: 10px;
    border: 1px solid #444;
    text-align: left;
}

.result-display th {
    background: rgba(255, 107, 53, 0.2);
    color: #ff8855;
    font-weight: 600;
}

.result-display tr:nth-child(even) {
    background: rgba(255, 107, 53, 0.05);
}

/* Action buttons container */
.result-actions {
    margin-top: 30px;
    gap: 15px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* Button base styles */
.btn-copy,
.btn-download {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
    white-space: nowrap;
}

/* Copy button */
.btn-copy {
    background: linear-gradient(135deg, #ff6b35, #ff8855);
}

.btn-copy:hover {
    background: linear-gradient(135deg, #ff8855, #ffa575);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-copy:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

/* Download buttons */
.btn-download {
    background: linear-gradient(135deg, #28a745, #34ce57);
}

.btn-download:hover {
    background: linear-gradient(135deg, #34ce57, #40d970);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-download:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

/* Alternate download button style */
.btn-download-alt {
    background: linear-gradient(135deg, #17a2b8, #20c997);
}

.btn-download-alt:hover {
    background: linear-gradient(135deg, #20c997, #30e0b0);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

/* Disabled state */
.btn-copy:disabled,
.btn-download:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .result-display {
        padding: 20px;
        max-height: 500px;
    }

    .result-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-copy,
    .btn-download {
        width: 100%;
        padding: 12px;
    }

    .result-display h1 {
        font-size: 1.5em;
    }

    .result-display h2 {
        font-size: 1.3em;
    }

    .result-display h3 {
        font-size: 1.1em;
    }

    .result-display table {
        font-size: 0.8em;
    }

    .result-display th,
    .result-display td {
        padding: 6px;
    }
}

/* Print styles */
@media print {
    .result-actions {
        display: none !important;
    }

    .result-display {
        max-height: none;
        overflow: visible;
        background: white;
        color: black;
    }

    .result-display h1,
    .result-display h2,
    .result-display h3,
    .result-display h4 {
        color: #333;
    }

    .result-display a {
        color: #0066cc;
    }

    .result-display code,
    .result-display pre {
        background: #f5f5f5;
        color: black;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .result-display {
        background: #1a1a1a;
        color: #e0e0e0;
    }
}