/* Shared Responsive Layout for N2KSoft Web Components - Premium Edition */

:root {
    --n2k-primary: #3182ce;
    --n2k-primary-hover: #2b6cb0;
    --n2k-bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --n2k-glass-bg: rgba(255, 255, 255, 0.85);
    --n2k-glass-border: rgba(255, 255, 255, 0.4);
    --n2k-shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.n2k-btn-premium {
    transition: all 0.2s ease;
}

.n2k-btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(49, 130, 206, 0.4) !important;
    filter: brightness(1.1);
}

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

.n2k-responsive-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    gap: 24px;
    padding: 24px;
    box-sizing: border-box;
    background: var(--n2k-bg-gradient);
    overflow: hidden;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.n2k-form-panel {
    flex: 0 0 620px;
    max-width: 620px;
    background: var(--n2k-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: var(--n2k-shadow-premium);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 28px;
    border: 1px solid var(--n2k-glass-border);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.n2k-form-panel:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.n2k-grid-panel {
    flex: 1;
    background: var(--n2k-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: var(--n2k-shadow-premium);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--n2k-glass-border);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Header styling within components */
.n2k-component-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 14px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Specific styling for Parapadeco rules grid area */
#n2k_parapadeco_rules_area {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    margin-top: 20px;
    padding: 15px;
    transition: all 0.3s ease;
}

/* Premium feedback animations */
@keyframes highlight-recalculate {
    0% {
        background-color: rgba(49, 130, 206, 0.1);
    }

    100% {
        background-color: transparent;
    }
}

.n2k-highlight-update {
    animation: highlight-recalculate 1s ease-out;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .n2k-responsive-container {
        flex-direction: column;
        overflow-y: auto;
        padding: 16px;
        gap: 16px;
    }

    .n2k-form-panel {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }

    .n2k-grid-panel {
        flex: 0 0 auto;
        min-height: 500px;
    }
}

/* DHTMLX Form overrides for Premium aesthetics */
.dhx_form-group {
    margin-bottom: 20px !important;
}

.dhx_label {
    font-weight: 600 !important;
    color: #2d3748 !important;
    font-size: 0.85rem !important;
    margin-bottom: 8px !important;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.dhx_input,
.dhx_select,
.dhx_datepicker-container {
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    padding: 8px 12px !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

.dhx_input:focus,
.dhx_select:focus {
    border-color: var(--n2k-primary) !important;
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.15) !important;
    outline: none !important;
}

/* Premium Segmented Control for Header */
.n2k-segmented-control {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 10px;
    gap: 2px;
}

.n2k-segmented-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.n2k-segmented-item:hover {
    background: rgba(255, 255, 255, 0.5);
    color: var(--n2k-primary);
}

.n2k-segmented-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.n2k-segmented-item.active {
    background: #ffffff;
    color: var(--n2k-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.n2k-segmented-item.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--n2k-primary);
    border-radius: 2px;
}