/**
 * Nordthy Badges - Modern Admin CSS
 * Neutrale farver med sort tema
 */

:root {
    --nordthy-black: #0a0a0a;
    --nordthy-gray-900: #1a1a1a;
    --nordthy-gray-800: #2a2a2a;
    --nordthy-gray-700: #3a3a3a;
    --nordthy-gray-600: #4a4a4a;
    --nordthy-gray-500: #6b7280;
    --nordthy-gray-400: #9ca3af;
    --nordthy-gray-300: #d1d5db;
    --nordthy-gray-200: #e5e7eb;
    --nordthy-gray-100: #f3f4f6;
    --nordthy-white: #ffffff;
    
    --nordthy-primary: #3b82f6;
    --nordthy-primary-hover: #2563eb;
    --nordthy-success: #10b981;
    --nordthy-warning: #f59e0b;
    --nordthy-danger: #ef4444;
    
    --nordthy-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --nordthy-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --nordthy-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --nordthy-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --nordthy-radius-sm: 6px;
    --nordthy-radius: 8px;
    --nordthy-radius-lg: 12px;
    --nordthy-radius-xl: 16px;
    
    --nordthy-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset og basis styling */
.nordthy-badges-admin-modern {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--nordthy-gray-900);
    line-height: 1.6;
}

.nordthy-badges-admin-modern * {
    box-sizing: border-box;
}

/* Header Section */
.nordthy-header {
    background: linear-gradient(135deg, var(--nordthy-black) 0%, var(--nordthy-gray-900) 100%);
    padding: 32px 0;
    margin: -10px -20px 32px -20px;
    border-radius: 0 0 var(--nordthy-radius-lg) var(--nordthy-radius-lg);
    box-shadow: var(--nordthy-shadow-lg);
}

.nordthy-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nordthy-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--nordthy-white);
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.nordthy-icon {
    width: 32px;
    height: 32px;
    stroke-width: 2.5;
}

/* Container */
.nordthy-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Notifications */
#notification-area {
    position: fixed;
    top: 32px;
    right: 32px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nordthy-notification {
    min-width: 320px;
    background: var(--nordthy-white);
    border-radius: var(--nordthy-radius);
    box-shadow: var(--nordthy-shadow-xl);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transform: translateX(400px);
    opacity: 0;
    transition: var(--nordthy-transition);
    border-left: 4px solid var(--nordthy-success);
}

.nordthy-notification-show {
    transform: translateX(0);
    opacity: 1;
}

.nordthy-notification-success {
    border-left-color: var(--nordthy-success);
}

.nordthy-notification-error {
    border-left-color: var(--nordthy-danger);
}

.nordthy-notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.nordthy-notification-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nordthy-notification-success .nordthy-notification-icon {
    stroke: var(--nordthy-success);
}

.nordthy-notification-error .nordthy-notification-icon {
    stroke: var(--nordthy-danger);
}

.nordthy-notification-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--nordthy-radius-sm);
    transition: var(--nordthy-transition);
    color: var(--nordthy-gray-400);
}

.nordthy-notification-close:hover {
    background: var(--nordthy-gray-100);
    color: var(--nordthy-gray-600);
}

.nordthy-notification-close svg {
    width: 16px;
    height: 16px;
}

/* Empty State */
.nordthy-empty-state {
    text-align: center;
    padding: 80px 40px;
    background: var(--nordthy-white);
    border-radius: var(--nordthy-radius-xl);
    box-shadow: var(--nordthy-shadow);
    border: 2px dashed var(--nordthy-gray-300);
}

.nordthy-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--nordthy-gray-100) 0%, var(--nordthy-gray-200) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nordthy-empty-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--nordthy-gray-400);
}

.nordthy-empty-state h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--nordthy-gray-900);
    margin: 0 0 12px 0;
}

.nordthy-empty-state p {
    font-size: 16px;
    color: var(--nordthy-gray-500);
    margin: 0 0 32px 0;
}

/* Badge Grid */
.nordthy-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Badge Card */
.nordthy-badge-card {
    background: var(--nordthy-white);
    border-radius: var(--nordthy-radius-lg);
    box-shadow: var(--nordthy-shadow);
    overflow: hidden;
    transition: var(--nordthy-transition);
    border: 1px solid var(--nordthy-gray-200);
}

.nordthy-badge-card:hover {
    box-shadow: var(--nordthy-shadow-lg);
    transform: translateY(-2px);
}

.nordthy-card-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--nordthy-gray-50) 0%, var(--nordthy-white) 100%);
    border-bottom: 1px solid var(--nordthy-gray-200);
}

.nordthy-card-title-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.nordthy-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--nordthy-gray-900);
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nordthy-card-actions {
    display: flex;
    gap: 8px;
}

/* Status Badge */
.nordthy-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nordthy-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.nordthy-status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--nordthy-success);
}

.nordthy-status-active .nordthy-status-dot {
    background: var(--nordthy-success);
}

.nordthy-status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--nordthy-danger);
}

.nordthy-status-inactive .nordthy-status-dot {
    background: var(--nordthy-danger);
}

.nordthy-status-scheduled {
    background: rgba(245, 158, 11, 0.1);
    color: var(--nordthy-warning);
}

.nordthy-status-scheduled .nordthy-status-dot {
    background: var(--nordthy-warning);
}

/* Card Body */
.nordthy-card-body {
    padding: 20px;
}

.nordthy-badge-preview-container {
    margin-bottom: 20px;
}

.nordthy-badge-preview-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--nordthy-gray-500);
    margin-bottom: 12px;
}

.nordthy-badge-preview-wrapper {
    position: relative;
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, var(--nordthy-gray-100) 0%, var(--nordthy-gray-50) 100%);
    border-radius: var(--nordthy-radius);
    border: 2px dashed var(--nordthy-gray-300);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nordthy-badge-sample {
    padding: 8px 16px;
    border-radius: var(--nordthy-radius-sm);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--nordthy-shadow);
    position: absolute;
}

.nordthy-badge-sample.nordthy-position-top-left {
    top: 12px;
    left: 12px;
}

.nordthy-badge-sample.nordthy-position-top-right {
    top: 12px;
    right: 12px;
}

.nordthy-badge-sample.nordthy-position-bottom-left {
    bottom: 12px;
    left: 12px;
}

.nordthy-badge-sample.nordthy-position-bottom-right {
    bottom: 12px;
    right: 12px;
}

/* Info Items */
.nordthy-card-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nordthy-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--nordthy-gray-50);
    border-radius: var(--nordthy-radius-sm);
    font-size: 14px;
}

.nordthy-info-icon {
    width: 18px;
    height: 18px;
    stroke: var(--nordthy-gray-400);
    flex-shrink: 0;
}

.nordthy-info-label {
    font-weight: 600;
    color: var(--nordthy-gray-600);
    margin-right: 4px;
}

.nordthy-info-value {
    color: var(--nordthy-gray-900);
}

/* Card Footer */
.nordthy-card-footer {
    padding: 16px 20px;
    background: var(--nordthy-gray-50);
    border-top: 1px solid var(--nordthy-gray-200);
}

/* Buttons */
.nordthy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--nordthy-radius);
    cursor: pointer;
    transition: var(--nordthy-transition);
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
}

.nordthy-btn svg {
    width: 18px;
    height: 18px;
}

.nordthy-btn-primary {
    background: var(--nordthy-primary);
    color: var(--nordthy-white);
    box-shadow: var(--nordthy-shadow-sm);
}

.nordthy-btn-primary:hover {
    background: var(--nordthy-primary-hover);
    box-shadow: var(--nordthy-shadow);
    transform: translateY(-1px);
}

.nordthy-btn-secondary {
    background: var(--nordthy-white);
    color: var(--nordthy-gray-700);
    border: 1px solid var(--nordthy-gray-300);
}

.nordthy-btn-secondary:hover {
    background: var(--nordthy-gray-50);
    border-color: var(--nordthy-gray-400);
}

.nordthy-btn-danger {
    background: var(--nordthy-danger);
    color: var(--nordthy-white);
}

.nordthy-btn-danger:hover {
    background: #dc2626;
}

.nordthy-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.nordthy-btn-sm svg {
    width: 16px;
    height: 16px;
}

.nordthy-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.nordthy-btn-lg svg {
    width: 20px;
    height: 20px;
}

/* Icon Buttons */
.nordthy-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--nordthy-white);
    border: 1px solid var(--nordthy-gray-300);
    border-radius: var(--nordthy-radius-sm);
    cursor: pointer;
    transition: var(--nordthy-transition);
    color: var(--nordthy-gray-600);
}

.nordthy-btn-icon:hover {
    background: var(--nordthy-gray-50);
    border-color: var(--nordthy-gray-400);
    color: var(--nordthy-gray-900);
}

.nordthy-btn-icon svg {
    width: 18px;
    height: 18px;
}

.nordthy-btn-icon-danger {
    color: var(--nordthy-danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.nordthy-btn-icon-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--nordthy-danger);
}

/* Modal */
.nordthy-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nordthy-modal-show {
    opacity: 1;
}

.nordthy-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.nordthy-modal-content {
    position: relative;
    background: var(--nordthy-white);
    border-radius: var(--nordthy-radius-xl);
    box-shadow: var(--nordthy-shadow-xl);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.95) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.nordthy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--nordthy-gray-200);
}

.nordthy-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--nordthy-gray-900);
    margin: 0;
}

.nordthy-modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--nordthy-radius-sm);
    transition: var(--nordthy-transition);
    color: var(--nordthy-gray-400);
}

.nordthy-modal-close:hover {
    background: var(--nordthy-gray-100);
    color: var(--nordthy-gray-600);
}

.nordthy-modal-close svg {
    width: 20px;
    height: 20px;
}

.nordthy-modal-body {
    padding: 24px;
}

.nordthy-modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nordthy-modal-icon-warning {
    background: rgba(245, 158, 11, 0.1);
}

.nordthy-modal-icon-warning svg {
    width: 32px;
    height: 32px;
    stroke: var(--nordthy-warning);
}

.nordthy-modal-body p {
    text-align: center;
    color: var(--nordthy-gray-600);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.nordthy-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    background: var(--nordthy-gray-50);
    border-top: 1px solid var(--nordthy-gray-200);
}

.nordthy-modal-footer .nordthy-btn {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nordthy-badges-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .nordthy-header {
        padding: 24px 0;
        margin: -10px -10px 24px -10px;
    }
    
    .nordthy-header-content {
        flex-direction: column;
        gap: 16px;
        padding: 0 20px;
        align-items: stretch;
    }
    
    .nordthy-title {
        font-size: 24px;
        justify-content: center;
    }
    
    .nordthy-icon {
        width: 28px;
        height: 28px;
    }
    
    .nordthy-btn-primary {
        width: 100%;
    }
    
    .nordthy-container {
        padding: 0 10px;
    }
    
    .nordthy-badges-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    #notification-area {
        left: 16px;
        right: 16px;
        top: 16px;
    }
    
    .nordthy-notification {
        min-width: 0;
    }
    
    .nordthy-empty-state {
        padding: 60px 20px;
    }
}

@media (max-width: 480px) {
    .nordthy-card-header {
        padding: 16px;
    }
    
    .nordthy-card-body {
        padding: 16px;
    }
    
    .nordthy-card-footer {
        padding: 12px 16px;
    }
    
    .nordthy-card-title {
        font-size: 16px;
    }
    
    .nordthy-info-item {
        font-size: 13px;
        padding: 10px;
    }
    
    .nordthy-modal-content {
        width: 95%;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .nordthy-badges-admin-modern {
        /* Kan implementeres hvis ønsket */
    }
}

/* Print styling */
@media print {
    .nordthy-header,
    .nordthy-card-actions,
    .nordthy-card-footer,
    #notification-area {
        display: none;
    }
    
    .nordthy-badge-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--nordthy-gray-300);
    }
}