/**
 * RAML to Class Diagram Converter - Styles for julianreed.net
 * Clean, minimal design with subtle colors and elegant typography
 */

.raml-converter-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #fefefe;
    border-radius: 2px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.raml-converter-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.raml-converter-header h3 {
    margin: 0 0 12px 0;
    color: #2c2c2c;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.raml-converter-header p {
    margin: 0;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

.raml-converter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

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

.raml-input-section,
.raml-output-section {
    display: flex;
    flex-direction: column;
}

.raml-input-section label {
    font-weight: 500;
    margin-bottom: 10px;
    color: #2c2c2c;
    font-size: 15px;
    letter-spacing: 0.01em;
}

.raml-textarea,
.mermaid-textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #d0d0d0;
    border-radius: 1px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    background: #fafafa;
    transition: all 0.2s ease;
    color: #333;
}

.raml-textarea:focus,
.mermaid-textarea:focus {
    outline: none;
    border-color: #555;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(85, 85, 85, 0.1);
}

.raml-converter-buttons {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.raml-btn {
    padding: 11px 24px;
    border: 1px solid #d0d0d0;
    border-radius: 1px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.raml-btn-primary {
    background: #2c2c2c;
    color: #ffffff;
    border-color: #2c2c2c;
}

.raml-btn-primary:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(44, 44, 44, 0.15);
}

.raml-btn-secondary {
    background: #ffffff;
    color: #2c2c2c;
    border-color: #d0d0d0;
}

.raml-btn-secondary:hover {
    background: #f5f5f5;
    border-color: #999;
}

.raml-error {
    margin-top: 18px;
    padding: 14px 16px;
    background: #fff8f8;
    color: #a94442;
    border-left: 3px solid #d9534f;
    border-radius: 1px;
    font-size: 14px;
    line-height: 1.5;
}

.raml-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    border-bottom: 1px solid #ddd;
}

.raml-tab {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    color: #666;
    transition: all 0.2s ease;
    letter-spacing: 0.01em;
}

.raml-tab:hover {
    color: #2c2c2c;
}

.raml-tab.active {
    color: #2c2c2c;
    border-bottom-color: #2c2c2c;
}

.raml-tab-content {
    display: none;
}

.raml-tab-content.active {
    display: block;
}

.diagram-container {
    min-height: 400px;
    padding: 30px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 1px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diagram-container svg {
    max-width: 100%;
    height: auto;
}

.placeholder-text {
    color: #999;
    font-style: italic;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
}

/* Mermaid diagram styling overrides */
.diagram-container .mermaid {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .raml-converter-container {
        padding: 20px;
        margin: 20px auto;
    }
    
    .raml-converter-buttons {
        flex-direction: column;
    }
    
    .raml-btn {
        width: 100%;
    }
    
    .raml-tabs {
        overflow-x: auto;
    }
}

/* Loading state */
.raml-btn-primary:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Success animation */
@keyframes successPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(44, 44, 44, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(44, 44, 44, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(44, 44, 44, 0);
    }
}

.raml-btn-primary.success {
    animation: successPulse 0.6s;
}
