/* Tool Hero Styles - Required by tool-page-structure.mdc */
.tool-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.hero-text {
    flex: 1;
    min-width: 260px;
}

.hero-text h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 740px;
    margin-bottom: 1rem;
    margin-top: 0;
}

@media (max-width: 767px) {
    .hero-text h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.125rem);
    }
}

/* Kubernetes Generator Styles */
.k8s-generator-wrapper {
    margin-bottom: 2rem;
}

.k8s-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    min-height: 600px;
}

.k8s-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 1rem;
}

.selector-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.resource-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.resource-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 0.9375rem;
    color: #475569;
    font-weight: 500;
}

.resource-btn:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
    transform: translateX(2px);
}

.resource-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.resource-label {
    flex: 1;
}

.k8s-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.k8s-form-panel,
.k8s-output-panel {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.panel-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.panel-subtitle {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
}

.form-container {
    position: relative;
}

.resource-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.resource-form.active {
    display: block;
}

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

.form-section {
    margin-bottom: 2rem;
}

.section-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.field-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.5rem;
}

.field-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9375rem;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
    
}

.field-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.field-input::placeholder {
    color: #94a3b8;
}

.field-hint {
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 1rem;
    margin-top: -0.5rem;
}

.key-value-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.key-value-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.key-input,
.value-input {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9375rem;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
    
}

.key-input:focus,
.value-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.remove-row-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #ef4444;
    background: #ffffff;
    color: #ef4444;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-row-btn:hover {
    background: #ef4444;
    color: #ffffff;
    transform: scale(1.05);
}

.add-row-btn {
    padding: 0.75rem 1.5rem;
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    color: #475569;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    
}

.add-row-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #3b82f6;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

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

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

.btn-reset {
    background: #f1f5f9;
    color: #475569;
}

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

.btn-copy {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.btn-copy:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.btn-download {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
}

.btn-download:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

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

.yaml-output-wrapper {
    background: #1e293b;
    border-radius: 8px;
    padding: 1.5rem;
    overflow: auto;
    max-height: 600px;
    border: 1px solid #334155;
}

.yaml-output {
    margin: 0;
    
    font-size: 0.875rem;
    line-height: 1.6;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.yaml-output code {
    color: inherit;
    background: transparent;
    padding: 0;
    font-size: inherit;
    
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .k8s-layout {
        grid-template-columns: 200px 1fr;
    }
}

@media (max-width: 768px) {
    .k8s-layout {
        grid-template-columns: 1fr;
    }

    .k8s-sidebar {
        position: static;
        order: 2;
    }

    .resource-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .resource-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .resource-label {
        display: none;
    }

    .k8s-form-panel,
    .k8s-output-panel {
        padding: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .key-value-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .remove-row-btn {
        width: 100%;
        height: 40px;
    }

    .output-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .yaml-output-wrapper {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .k8s-generator-wrapper {
        margin-top: 1rem;
    }

    .k8s-form-panel,
    .k8s-output-panel {
        padding: 1rem;
    }

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

    .form-section {
        margin-bottom: 1.5rem;
    }

    .yaml-output {
        font-size: 0.8125rem;
    }
}
