/* SQL Query Builder Specific Styles */

.schema-input-area {
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.schema-input-area:focus-within {
    border-color: #ff6b35;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

/* Query result display */
.sql-query-block {
    background: #1e1e1e;
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
}

.sql-query-block::before {
    content: "SQL";
    position: absolute;
    top: -10px;
    left: 15px;
    background: #ff6b35;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.sql-code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #e0e0e0;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.explanation-block {
    background: #1a1a1a;
    border: 1px solid rgba(100, 200, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
}

.explanation-block::before {
    content: "Explanation";
    position: absolute;
    top: -10px;
    left: 15px;
    background: #64c8ff;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.index-suggestions-block {
    background: #1a1a1a;
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
}

.index-suggestions-block::before {
    content: "Index Suggestions";
    position: absolute;
    top: -10px;
    left: 15px;
    background: #4CAF50;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.test-data-block {
    background: #1a1a1a;
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
}

.test-data-block::before {
    content: "Test Data";
    position: absolute;
    top: -10px;
    left: 15px;
    background: #FFC107;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* Database type indicator */
.db-type-indicator {
    display: inline-block;
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* Syntax highlighting for SQL */
.sql-keyword {
    color: #569cd6;
    font-weight: bold;
}

.sql-string {
    color: #ce9178;
}

.sql-comment {
    color: #6a9955;
    font-style: italic;
}

.sql-number {
    color: #b5cea8;
}

.sql-function {
    color: #dcdcaa;
}

/* Form styling improvements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #e0e0e0;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    transition: all 0.3s ease;
    resize: vertical;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.2);
}

.form-group textarea::placeholder {
    color: #888;
    opacity: 1;
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.checkbox-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    color: #e0e0e0;
    cursor: pointer;
    user-select: none;
}

.checkbox-inline input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Two-column options layout */
.options-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 8px;
}

.options-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-block {
    display: flex;
    align-items: flex-start;
    color: #e0e0e0;
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-block:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 107, 53, 0.4);
}

.checkbox-block input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #ff6b35;
    background: #1a1a1a;
    border: 1px solid #666;
    border-radius: 3px;
}

.checkbox-block input[type="checkbox"]:checked {
    background: #ff6b35;
    border-color: #ff6b35;
}

.checkbox-block input[type="checkbox"]:focus {
    outline: 2px solid rgba(255, 107, 53, 0.5);
    outline-offset: 2px;
}

.safety-toggle-btn {
    position: fixed;
    top: 130px;
    right: 20px;
    background: transparent;
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: gentle-pulse 3s ease-in-out infinite;
    z-index: 1000;
}

.safety-toggle-btn:hover {
    background: rgba(255, 152, 0, 0.1);
    border-color: rgba(255, 152, 0, 0.6);
    transform: scale(1.1);
}

.caution-triangle {
    font-size: 18px;
    filter: drop-shadow(0 0 3px rgba(255, 152, 0, 0.5));
}

@keyframes gentle-pulse {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(255, 152, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 15px rgba(255, 152, 0, 0.5);
    }
}

/* Safety popup overlay */
.safety-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.safety-overlay.show {
    opacity: 1;
    visibility: visible;
}

.safety-popup {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid rgba(255, 152, 0, 0.4);
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.safety-overlay.show .safety-popup {
    transform: scale(1) translateY(0);
}

.popup-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 25px 15px 25px;
    border-bottom: 1px solid rgba(255, 152, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 107, 53, 0.05));
}

.popup-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ff9800;
    font-size: 1.2rem;
    font-weight: 600;
}

.warning-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 5px rgba(255, 152, 0, 0.5));
    animation: warning-pulse 2s ease-in-out infinite;
}

@keyframes warning-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}



.popup-content {
    padding: 20px 25px 25px 25px;
    color: #e0e0e0;
}

.popup-content p {
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 1.1rem;
    text-align: center;
}

.popup-content ul {
    margin: 0 0 25px 0;
    padding-left: 20px;
}

.popup-content li {
    margin-bottom: 10px;
    color: #d0d0d0;
    line-height: 1.5;
}

.popup-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.btn-acknowledge {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
}

.btn-acknowledge:hover {
    background: linear-gradient(135deg, #f57c00 0%, #e65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

/* Button styling */
.btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

.btn-download {
    width: auto;
    margin: 0;
    padding: 10px 20px;
    font-size: 14px;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 30px;
    color: #ff6b35;
    font-size: 16px;
    font-weight: 500;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ff6b35;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error styling */
.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .checkbox-row {
        flex-direction: column;
        gap: 10px;
    }

    .options-two-column {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .options-column {
        gap: 6px;
    }

    .checkbox-block {
        padding: 8px 10px;
    }

    .btn-download {
        width: 100%;
        margin-bottom: 10px;
    }

    .form-container {
        padding: 15px;
    }

    .safety-toggle-btn {
        top: 100px;
        right: 15px;
        width: 32px;
        height: 32px;
    }

    .safety-popup {
        width: 95%;
        margin: 10px;
    }

    .popup-header {
        padding: 15px 20px 12px 20px;
    }

    .popup-content {
        padding: 15px 20px 20px 20px;
    }

    .popup-title {
        font-size: 1.1rem;
    }

    .warning-icon {
        font-size: 1.5rem;
    }

    .btn-acknowledge {
        padding: 10px 20px;
        font-size: 14px;
    }

    .caution-triangle {
        font-size: 16px;
    }
}

/* Query complexity indicator */
.complexity-simple {
    color: #4CAF50;
}

.complexity-moderate {
    color: #FF9800;
}

.complexity-advanced {
    color: #f44336;
}

/* Database type specific styling */
.db-mysql {
    border-left: 4px solid #00758f;
}

.db-postgresql {
    border-left: 4px solid #336791;
}

.db-sqlite {
    border-left: 4px solid #003b57;
}

.db-sqlserver {
    border-left: 4px solid #cc2927;
}

.db-oracle {
    border-left: 4px solid #f80000;
}

.db-mongodb {
    border-left: 4px solid #4db33d;
}

/* Script format specific styling */
.script-block {
    background: #1a1a1a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
}

.script-block::before {
    position: absolute;
    top: -10px;
    left: 15px;
    background: #8a2be2;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.script-bash::before {
    content: "Bash Script";
    background: #4EAA25;
}

.script-powershell::before {
    content: "PowerShell";
    background: #012456;
}

.script-python::before {
    content: "Python";
    background: #3776ab;
}

.script-nodejs::before {
    content: "Node.js";
    background: #339933;
}

.docker-block {
    background: #1a1a1a;
    border: 1px solid rgba(0, 123, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
}

.docker-block::before {
    content: "Docker Compose";
    position: absolute;
    top: -10px;
    left: 15px;
    background: #007bff;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.cli-block {
    background: #1a1a1a;
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
}

.cli-block::before {
    content: "Command Line";
    position: absolute;
    top: -10px;
    left: 15px;
    background: #ff9800;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.orm-block {
    background: #1a1a1a;
    border: 1px solid rgba(156, 39, 176, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
}

.orm-block::before {
    content: "ORM Examples";
    position: absolute;
    top: -10px;
    left: 15px;
    background: #9c27b0;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.documentation-block {
    background: #1a1a1a;
    border: 1px solid rgba(0, 188, 212, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
}

.documentation-block::before {
    content: "Documentation";
    position: absolute;
    top: -10px;
    left: 15px;
    background: #00bcd4;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* Code syntax highlighting for different languages */
.code-block {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #e0e0e0;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.bash-keyword {
    color: #ff79c6;
    font-weight: bold;
}

.bash-string {
    color: #f1fa8c;
}

.bash-comment {
    color: #6272a4;
    font-style: italic;
}

.powershell-keyword {
    color: #569cd6;
    font-weight: bold;
}

.powershell-cmdlet {
    color: #dcdcaa;
}

.python-keyword {
    color: #ff79c6;
    font-weight: bold;
}

.python-string {
    color: #f1fa8c;
}

.python-function {
    color: #50fa7b;
}

.js-keyword {
    color: #ff79c6;
    font-weight: bold;
}

.js-function {
    color: #50fa7b;
}

.js-string {
    color: #f1fa8c;
}

.yaml-key {
    color: #50fa7b;
}

.yaml-value {
    color: #f1fa8c;
}