/* CSS Validator Specific Styles */
.validator-interface {
    margin-bottom: 2rem;
}

.validator-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.validator-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.validator-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.validator-title-group {
    flex: 1;
}

.validator-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

.validator-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.validator-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f3f4f6;
    color: #374151;
}

.btn-action:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.btn-action:active {
    transform: translateY(0);
}

.btn-validate {
    background: #3b82f6;
    color: #ffffff;
}

.btn-validate:hover {
    background: #2563eb;
}

.btn-icon {
    font-size: 1rem;
    line-height: 1;
}

.btn-text {
    line-height: 1;
}

.editor-container {
    position: relative;
    background: #ffffff;
}

.editor-wrapper {
    position: relative;
    border-top: 1px solid #e5e7eb;
}

.editor {
    height: 500px;
    width: 100%;
    
}

.editor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.editor-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.overlay-text {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.validator-stats {
    display: flex;
    gap: 2rem;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.results-container {
    margin-top: 1.5rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.results-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.btn-close-results {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: color 0.2s ease;
    border-radius: 4px;
}

.btn-close-results:hover {
    color: #111827;
    background: #f3f4f6;
}

.results-content {
    padding: 1.5rem;
}

.result-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.result-status.valid {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.result-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.result-status.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.result-status-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.result-status-text {
    font-weight: 500;
    font-size: 1rem;
}

.result-summary {
    margin: 0;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.result-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.result-list-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-list-title:first-child {
    margin-top: 0;
}

.result-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    background: #f9fafb;
    border-left: 3px solid #e5e7eb;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #374151;
}

.result-item.error-item {
    background: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.result-item.warning-item {
    background: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

.result-item-line {
    font-weight: 600;
    color: #6b7280;
}

/* ACE Editor Custom Styles */
.ace-xcode .ace_content .ace_variable {
    color: #2d5ada;
}

.ace-xcode .ace_content .ace_string {
    color: #cc5b5c;
}

.ace-xcode .ace_content .ace_constant.ace_numeric {
    color: #008100;
}

.ace-xcode .ace_content .ace_boolean {
    color: #0b7500;
}

.ace-xcode .ace_content .ace_comment {
    color: #808080;
    font-style: italic;
}

.ace-xcode .ace_content .ace_keyword {
    color: #d73a49;
}

/* Mobile Responsive Styles */
@media (max-width: 767px) {
    .validator-header {
        padding: 1rem;
    }

    .validator-title {
        font-size: 1.25rem;
    }

    .validator-actions {
        width: 100%;
    }

    .btn-action {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    .btn-text {
        display: none;
    }

    .btn-action {
        padding: 0.625rem;
    }

    .editor {
        height: 400px;
    }

    .validator-stats {
        padding: 0.75rem 1rem;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .stat-value {
        font-size: 1.125rem;
    }

    .results-header {
        padding: 1rem;
    }

    .results-content {
        padding: 1rem;
    }

    .result-status {
        padding: 0.75rem;
    }

    .result-item {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .validator-interface {
        margin-top: 1.5rem;
    }

    .validator-card {
        border-radius: 12px;
    }

    .results-container {
        border-radius: 12px;
    }

    .editor {
        height: 350px;
    }

    .validator-stats {
        flex-direction: column;
        gap: 0.75rem;
    }

    .stat-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .validator-card,
    .results-container {
        background: #1f2937;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .validator-title {
        color: #f9fafb;
    }

    .validator-subtitle {
        color: #9ca3af;
    }

    .validator-header,
    .editor-wrapper,
    .results-header {
        border-color: #374151;
    }

    .btn-action {
        background: #374151;
        color: #f9fafb;
    }

    .btn-action:hover {
        background: #4b5563;
    }

    .validator-stats {
        background: #111827;
        border-color: #374151;
    }

    .stat-label {
        color: #9ca3af;
    }

    .stat-value {
        color: #f9fafb;
    }

    .results-title {
        color: #f9fafb;
    }

    .btn-close-results {
        color: #9ca3af;
    }

    .btn-close-results:hover {
        color: #f9fafb;
        background: #374151;
    }

    .result-item {
        background: #111827;
        border-left-color: #4b5563;
        color: #d1d5db;
    }

    .overlay-content {
        background: rgba(31, 41, 55, 0.95);
    }

    .overlay-text {
        color: #9ca3af;
    }
}
