/**
 * Hostingway Tools - Premium Dark Design
 * Award-Winning Professional Design
 * Matching Hostingway.nl Premium Feel
 */

/* ============================================
   GLOBAL STYLES & VARIABLES - DARK PREMIUM THEME
   ============================================ */
:root {
    /* Premium Dark Colors - Matching Hostingway.nl */
    --hwt-primary: #1e3a8a; /* Deep blue */
    --hwt-primary-dark: #1e40af;
    --hwt-primary-light: #3b82f6;
    --hwt-primary-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #6366f1 100%); /* Blue to purple */
    --hwt-success: #10b981; /* Green */
    --hwt-warning: #f59e0b; /* Amber */
    --hwt-danger: #ef4444; /* Red */
    --hwt-info: #3b82f6; /* Blue */
    
    /* Dark Background Colors */
    --hwt-bg-dark: #0f172a; /* Very dark blue */
    --hwt-bg-darker: #020617; /* Almost black */
    --hwt-bg-card: #1e293b; /* Dark card background */
    --hwt-bg-card-hover: #334155; /* Card hover */
    
    /* Text Colors */
    --hwt-text: #f8fafc; /* Almost white */
    --hwt-text-light: #cbd5e1; /* Light gray */
    --hwt-text-muted: #94a3b8; /* Muted gray */
    
    /* Borders & Shadows */
    --hwt-border: rgba(148, 163, 184, 0.2); /* Subtle border */
    --hwt-border-light: rgba(148, 163, 184, 0.1);
    --hwt-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --hwt-shadow-hover: 0 8px 30px rgba(30, 58, 138, 0.4);
    --hwt-shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
    
    /* Spacing & Sizing */
    --hwt-radius: 16px;
    --hwt-radius-sm: 12px;
    --hwt-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   MAIN WIDGET CONTAINERS - DARK PREMIUM
   ============================================ */
.hwt-tool-widget,
.hwt-combo-widget {
    max-width: 100%;
    margin: 40px 0;
    padding: 45px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid var(--hwt-border);
    border-radius: var(--hwt-radius);
    box-shadow: var(--hwt-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative;
    overflow: hidden;
    transition: var(--hwt-transition);
}

/* Premium top accent bar */
.hwt-tool-widget::before,
.hwt-combo-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--hwt-primary-gradient);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.5);
}

/* Subtle background pattern */
.hwt-tool-widget::after,
.hwt-combo-widget::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.hwt-tool-widget > *,
.hwt-combo-widget > * {
    position: relative;
    z-index: 1;
}

.hwt-tool-widget:hover,
.hwt-combo-widget:hover {
    box-shadow: var(--hwt-shadow-hover), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.3);
}

/* ============================================
   TYPOGRAPHY - PREMIUM DARK
   ============================================ */
.hwt-tool-title,
.hwt-combo-title {
    margin: 0 0 16px 0;
    font-size: 36px;
    font-weight: 900;
    color: var(--hwt-text);
    line-height: 1.2;
    letter-spacing: -0.8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hwt-tool-description {
    margin: 0 0 35px 0;
    color: var(--hwt-text-light);
    font-size: 17px;
    line-height: 1.8;
    font-weight: 400;
    opacity: 0.9;
}

/* ============================================
   FORM STYLES - DARK PREMIUM
   ============================================ */
.hwt-tool-form {
    margin-bottom: 35px;
}

.hwt-input-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: stretch;
}

.hwt-tool-input {
    flex: 1;
    min-width: 280px;
    padding: 18px 24px;
    border: 2px solid var(--hwt-border);
    border-radius: var(--hwt-radius-sm);
    font-size: 16px;
    font-family: inherit;
    transition: var(--hwt-transition);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    color: var(--hwt-text);
    font-weight: 500;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hwt-tool-input::placeholder {
    color: var(--hwt-text-muted);
    font-weight: 400;
}

.hwt-tool-input:focus {
    outline: none;
    border-color: var(--hwt-primary-light);
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        var(--hwt-shadow-glow);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-2px);
}

.hwt-tool-button {
    padding: 18px 40px;
    background: var(--hwt-primary-gradient);
    color: #ffffff;
    border: none;
    border-radius: var(--hwt-radius-sm);
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: var(--hwt-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-shadow: 
        0 4px 15px rgba(30, 58, 138, 0.4),
        0 2px 5px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.hwt-tool-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hwt-tool-button:hover::before {
    left: 100%;
}

.hwt-tool-button:hover {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #6366f1 100%);
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(30, 58, 138, 0.5),
        0 4px 10px rgba(0, 0, 0, 0.3),
        var(--hwt-shadow-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hwt-tool-button:active {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 15px rgba(30, 58, 138, 0.4),
        0 2px 5px rgba(0, 0, 0, 0.2);
}

.hwt-tool-button:disabled,
.hwt-tool-button.hwt-loading-state {
    background: #475569;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
    box-shadow: none;
}

/* Input hint styling */
.hwt-input-hint {
    background: rgba(30, 58, 138, 0.2) !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    color: var(--hwt-text-light) !important;
    backdrop-filter: blur(10px);
}

/* ============================================
   RESULT CONTAINER - DARK PREMIUM
   ============================================ */
.hwt-tool-result {
    margin-top: 35px;
    padding: 35px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-radius: var(--hwt-radius-sm);
    border: 1px solid var(--hwt-border);
    min-height: 120px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 10px rgba(0, 0, 0, 0.3),
        0 2px 10px rgba(0, 0, 0, 0.2);
}

.hwt-tool-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--hwt-primary-gradient);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.hwt-loading {
    text-align: center;
    padding: 50px 20px;
    color: var(--hwt-text-light);
    font-size: 18px;
    font-weight: 600;
}

/* Copy button styles */
.hwt-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--hwt-bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--hwt-border);
    color: var(--hwt-text);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--hwt-shadow);
    transition: var(--hwt-transition);
    z-index: 10;
}

.hwt-copy-btn:hover {
    background: var(--hwt-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--hwt-shadow-hover);
}

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

/* Smooth animations for results */
.hwt-result-content {
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.hwt-result-content.active {
    opacity: 1;
    transform: translateY(0);
}

/* Loading skeleton */
.hwt-skeleton {
    background: linear-gradient(90deg, 
        var(--hwt-bg-card) 0%, 
        var(--hwt-bg-card-hover) 50%, 
        var(--hwt-bg-card) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--hwt-radius-sm);
    min-height: 20px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.hwt-spinner {
    display: inline-block;
    margin-right: 16px;
    font-size: 32px;
    animation: hwt-spin 1s linear infinite;
    color: var(--hwt-primary-light);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
}

@keyframes hwt-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.hwt-result-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
    color: var(--hwt-text);
}

.hwt-result-content.active {
    display: block;
}

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

/* ============================================
   RESULT STYLES - DARK PREMIUM
   ============================================ */
.hwt-result {
    padding: 0;
    border-radius: var(--hwt-radius-sm);
    margin-top: 0;
    line-height: 1.7;
    background: transparent;
    color: var(--hwt-text);
}

.hwt-result h4 {
    margin: 0 0 25px 0;
    font-size: 28px;
    font-weight: 900;
    color: var(--hwt-text);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hwt-result h4::before {
    content: '';
    width: 5px;
    height: 28px;
    background: var(--hwt-primary-gradient);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

.hwt-result h5 {
    margin: 30px 0 18px 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--hwt-text);
    letter-spacing: -0.3px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.hwt-result p {
    margin: 14px 0;
    color: var(--hwt-text-light);
    font-size: 16px;
    line-height: 1.8;
}

.hwt-result-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 2px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    padding: 22px;
    border-radius: var(--hwt-radius-sm);
    box-shadow: 
        0 4px 15px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hwt-result-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 2px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 22px;
    border-radius: var(--hwt-radius-sm);
    box-shadow: 
        0 4px 15px rgba(239, 68, 68, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hwt-result-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 2px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
    padding: 22px;
    border-radius: var(--hwt-radius-sm);
    box-shadow: 
        0 4px 15px rgba(245, 158, 11, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hwt-result-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 2px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    padding: 22px;
    border-radius: var(--hwt-radius-sm);
    box-shadow: 
        0 4px 15px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ============================================
   TABLES - PREMIUM DARK DESIGN
   ============================================ */
.hwt-result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 30px 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border-radius: var(--hwt-radius-sm);
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid var(--hwt-border);
}

.hwt-result-table th,
.hwt-result-table td {
    padding: 18px 24px;
    text-align: left;
    border-bottom: 1px solid var(--hwt-border);
}

.hwt-result-table th {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    font-weight: 800;
    color: var(--hwt-text);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    position: sticky;
    top: 0;
    z-index: 10;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hwt-result-table tbody tr {
    transition: var(--hwt-transition);
    background: rgba(30, 41, 59, 0.3);
}

.hwt-result-table tbody tr:last-child td {
    border-bottom: none;
}

.hwt-result-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(30, 58, 138, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    transform: scale(1.01);
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.2);
}

.hwt-result-table code {
    background: rgba(15, 23, 42, 0.8);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--hwt-border);
    display: inline-block;
    color: #93c5fd;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================
   BADGES - PREMIUM DARK STYLING
   ============================================ */
.hwt-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: var(--hwt-transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hwt-badge:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hwt-badge-success {
    background: linear-gradient(135deg, var(--hwt-success) 0%, #059669 100%);
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hwt-badge-danger {
    background: linear-gradient(135deg, var(--hwt-danger) 0%, #dc2626 100%);
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hwt-badge-warning {
    background: linear-gradient(135deg, var(--hwt-warning) 0%, #d97706 100%);
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hwt-badge-info {
    background: linear-gradient(135deg, var(--hwt-info) 0%, #2563eb 100%);
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ============================================
   COMBO WIDGET - DARK PREMIUM
   ============================================ */
.hwt-combo-widget .hwt-tool-selector {
    margin-bottom: 35px;
}

.hwt-combo-widget .hwt-tool-selector label {
    display: block;
    margin-bottom: 14px;
    font-weight: 800;
    color: var(--hwt-text);
    font-size: 17px;
    letter-spacing: -0.3px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.hwt-tool-select {
    width: 100%;
    max-width: 500px;
    padding: 16px 24px;
    border: 2px solid var(--hwt-border);
    border-radius: var(--hwt-radius-sm);
    font-size: 16px;
    font-family: inherit;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: var(--hwt-transition);
    color: var(--hwt-text);
    font-weight: 500;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hwt-tool-select:focus {
    outline: none;
    border-color: var(--hwt-primary-light);
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        var(--hwt-shadow-glow);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-2px);
}

.hwt-tool-container {
    margin-top: 35px;
}

/* ============================================
   SPECIFIC RESULT STYLES - DARK PREMIUM
   ============================================ */
.hwt-mx-record,
.hwt-dmarc-section,
.hwt-cms-info-item,
.hwt-ssl-info-item {
    padding: 25px;
    margin: 15px 0;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-left: 5px solid var(--hwt-primary-light);
    border-radius: var(--hwt-radius-sm);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: var(--hwt-transition);
    border-top: 1px solid var(--hwt-border);
    border-right: 1px solid var(--hwt-border);
    border-bottom: 1px solid var(--hwt-border);
}

.hwt-mx-record:hover,
.hwt-dmarc-section:hover,
.hwt-cms-info-item:hover,
.hwt-ssl-info-item:hover {
    transform: translateX(6px) translateY(-2px);
    box-shadow: 
        0 6px 25px rgba(59, 130, 246, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border-left-color: var(--hwt-primary-light);
    border-left-width: 6px;
}

.hwt-dmarc-section h4 {
    margin: 0 0 20px 0;
    color: var(--hwt-text);
    font-size: 22px;
    font-weight: 800;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--hwt-border);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.hwt-cms-info,
.hwt-ssl-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.hwt-cms-info-item::before,
.hwt-ssl-info-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--hwt-primary-gradient);
    opacity: 0;
    transition: var(--hwt-transition);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.hwt-cms-info-item:hover::before,
.hwt-ssl-info-item:hover::before {
    opacity: 1;
}

.hwt-cms-info-item strong,
.hwt-ssl-info-item strong {
    display: block;
    margin-bottom: 12px;
    color: var(--hwt-text-light);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.9;
    font-weight: 800;
}

.hwt-error {
    color: #fca5a5;
    padding: 20px 26px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 2px solid rgba(239, 68, 68, 0.4);
    border-radius: var(--hwt-radius-sm);
    margin: 20px 0;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.7;
    box-shadow: 
        0 4px 15px rgba(239, 68, 68, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .hwt-tool-widget,
    .hwt-combo-widget {
        padding: 30px;
        margin: 30px 0;
    }
    
    .hwt-tool-title,
    .hwt-combo-title {
        font-size: 28px;
    }
    
    .hwt-input-group {
        flex-direction: column;
    }
    
    .hwt-tool-input,
    .hwt-tool-button {
        width: 100%;
        min-width: 100%;
    }
    
    .hwt-tool-button {
        justify-content: center;
    }
    
    .hwt-cms-info,
    .hwt-ssl-info {
        grid-template-columns: 1fr;
    }
    
    .hwt-result-table {
        font-size: 14px;
    }
    
    .hwt-result-table th,
    .hwt-result-table td {
        padding: 14px 18px;
    }
}

@media (max-width: 480px) {
    .hwt-tool-widget,
    .hwt-combo-widget {
        padding: 25px;
    }
    
    .hwt-tool-title,
    .hwt-combo-title {
        font-size: 24px;
    }
    
    .hwt-tool-input {
        font-size: 15px;
        padding: 16px 20px;
    }
    
    .hwt-tool-button {
        font-size: 14px;
        padding: 16px 32px;
    }
}
