/* Stage Tools Web Interface Styles */
:root {
    /* Q2 Brand Colors */
    --q2-red: rgb(249, 33, 33);
    --q2-yellow: rgb(255, 232, 0);
    --q2-blue: rgb(61, 211, 252);
    --q2-green: rgb(51, 196, 52);
    
    /* Updated color scheme using Q2 branding */
    --primary-color: var(--q2-blue);
    --secondary-color: #6c757d;
    --success-color: var(--q2-green);
    --warning-color: var(--q2-yellow);
    --danger-color: var(--q2-red);
    --info-color: var(--q2-blue);
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f5f5;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--q2-blue), var(--q2-red));
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.header-text h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-text p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Solutions Grid */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 100%;
}

.solution-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    transition: var(--transition);
    border: 1px solid #e9ecef;
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.quick-install {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.install-cmd {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 12px;
    gap: 0.5rem;
}

.install-cmd code {
    flex: 1;
    background: none;
    padding: 0;
    font-size: 11px;
    word-break: break-all;
    color: #495057;
}

.copy-btn-small {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 3px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 10px;
    transition: var(--transition);
    flex-shrink: 0;
}

.copy-btn-small:hover {
    background: #0056b3;
}

.solution-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.solution-icon {
    font-size: 2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.solution-meta h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.solution-title {
    font-size: 1.25rem;
    margin: 0;
}

.solution-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.solution-features {
    margin-bottom: 1.5rem;
}

.solution-features h4 {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.solution-features ul {
    list-style: none;
}

.solution-features li {
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
    font-size: 0.9rem;
}

.solution-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-ready {
    background-color: rgba(51, 196, 52, 0.1);
    color: rgb(35, 136, 36);
    border: 1px solid rgba(51, 196, 52, 0.3);
}

.status-beta {
    background-color: rgba(255, 232, 0, 0.1);
    color: rgb(179, 163, 0);
    border: 1px solid rgba(255, 232, 0, 0.3);
}

.status-coming-soon {
    background-color: rgba(249, 33, 33, 0.1);
    color: rgb(179, 24, 24);
    border: 1px solid rgba(249, 33, 33, 0.3);
}

/* Buttons */
.solution-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: rgb(45, 191, 232);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 211, 252, 0.3);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: rgb(35, 136, 36);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 196, 52, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.btn-disabled {
    background-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

/* Solution Detail */
.solution-detail {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.solution-detail-header {
    padding: 2rem;
    background: var(--light-color);
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.solution-detail-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.solution-icon-large {
    font-size: 3rem;
}

.solution-path {
    color: #666;
    font-family: monospace;
    font-size: 0.9rem;
}

.solution-content {
    display: grid;
    grid-template-columns: 67% 30%;
    gap: 2rem;
    padding: 2rem;
}

@media (max-width: 1024px) {
    .solution-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.readme-content {
    max-width: none;
}

.readme-content h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.readme-content h2 {
    color: var(--dark-color);
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.readme-content h3 {
    margin: 1.5rem 0 0.5rem 0;
}

.readme-content p {
    margin-bottom: 1rem;
}

.readme-content ul {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.readme-content pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.readme-content code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* Sidebar */
.sidebar {
    border-left: 1px solid #e9ecef;
    padding-left: 2rem;
}

.sidebar h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.install-section, .solution-info, .features-list {
    margin-bottom: 2rem;
}

.install-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.quick-copy {
    position: relative;
}

.quick-copy h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.code-block {
    position: relative;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.code-block pre {
    margin: 0;
    padding: 1rem;
    background: none;
    border: none;
}

.copy-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.copy-btn:hover {
    background: #5a6268;
}

.info-grid {
    display: grid;
    gap: 0.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-large {
    max-width: 900px;
    width: 90%;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.method-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-btn:hover {
    background: var(--light-color);
}

/* Empty State */
.empty-state, .error-state, .no-docs {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-state h2, .error-state h2, .no-docs h2 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* Responsive Design - Progressive Breakpoints */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
        padding: 0 15px;
    }
    
    .solutions-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .solutions-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .solution-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        display: flex;
        flex-direction: column;
    }
    
    .sidebar {
        order: -1;
        border-left: none;
        border-bottom: 2px solid #e9ecef;
        padding: 0 0 2rem 0;
        margin: 0 0 1rem 0;
    }
    
    .main-content {
        order: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
        max-width: 100%;
        margin: 0 auto;
        overflow-x: hidden;
    }
    
    .solutions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
        width: 100%;
        max-width: 100%;
    }
    
    .solution-card {
        padding: 1rem;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .solution-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
        max-width: 100%;
        display: block;
    }
    
    .sidebar {
        border-left: none;
        border-top: 1px solid #e9ecef;
        padding: 1rem 0 0 0;
        margin: 1rem 0 0 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .install-section {
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .solution-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-width: 95%;
    }
    
    .code-block {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        box-sizing: border-box;
        margin: 0.5rem 0;
    }
    
    .code-block pre {
        font-size: 11px;
        overflow-x: auto;
        white-space: pre;
        word-break: break-all;
        padding: 8px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        line-height: 1.4;
    }
    
    .quick-copy {
        margin-bottom: 1rem;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }
    
    .quick-copy h4 {
        font-size: 13px;
        margin-bottom: 0.4rem;
    }
    
    .header-content {
        text-align: center;
        padding: 1rem 0;
    }
    
    .header-content h1 {
        font-size: 1.6rem;
        margin: 0;
        word-wrap: break-word;
    }
    
    .footer-logo {
        height: 30px;
    }
    
    .solution-detail-header {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .solution-meta h3 {
        font-size: 1.2rem;
        margin: 0.5rem 0;
    }
    
    .breadcrumb {
        margin-bottom: 1rem;
        font-size: 14px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.75rem;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 5px;
    }
    
    .header-content h1 {
        font-size: 1.4rem;
    }
    
    .code-block pre {
        font-size: 10px;
        padding: 8px;
        line-height: 1.3;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.6rem;
        font-size: 14px;
    }
    
    .solution-card {
        padding: 0.8rem;
    }
    
    .solution-icon {
        font-size: 1.5rem;
        margin-right: 0.5rem;
    }
    
    .solution-title {
        font-size: 1.1rem;
    }
    
    .quick-copy h4 {
        font-size: 12px;
    }
    
    .modal-content {
        width: 98%;
        margin: 5% auto;
        padding: 1rem;
    }
}