/* ==========================================
   🚀 XML SITEMAP MAKER - ULTRA PRO LAYOUT 2025
   Final - Clean, Modern, Premium Feel
========================================== */

.dw-xml-container {
    max-width: 1200px;
    margin: 80px auto 100px;
    padding: 0 20px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #0f172a;
}

/* HEADER - Bigger & Gradient */
.dw-xml-header {
    text-align: center;
    margin-bottom: 60px;
}

.dw-xml-header h2 {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 16px;
    background: linear-gradient(to right, #10b981, #059669, #047857);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dw-xml-header p {
    color: #64748b;
    font-size: 17px;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 🌟 TWO-COLUMN WORKSPACE - Pro Grid */
.dw-xml-workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: stretch;
}

/* CARDS - Premium Look */
.dw-card {
    background: #ffffff;
    padding: 32px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.dw-card:hover {
    transform: translateY(-6px);
    border-color: #a7f3d0;
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.18);
}

.dw-card h3 {
    margin: 0 0 28px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

/* Dark mode support (if you ever add it) */
.dw-card.dark {
    background: linear-gradient(135deg, #0f172a, #020617);
    color: white;
    border-color: #334155;
}

.dw-card.dark h3 {
    color: white;
}

/* FORM GROUPS */
.dw-kx-form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.dw-kx-form-group label {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 10px;
}

/* TEXTAREA - Code-like */
textarea {
    width: 100%;
    min-height: 180px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14.5px;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s;
    box-sizing: border-box;
}

textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

/* SIDE-BY-SIDE DROPDOWNS */
.dw-grid-2 {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.dw-grid-2 .dw-kx-form-group {
    flex: 1 1 calc(50% - 10px);
    min-width: 200px;
}

.dw-grid-2 select {
    width: 100%;
    height: 50px;
    padding: 0 44px 0 16px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364758b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right 16px center;
    background-size: 12px;
    font-size: 15px;
    appearance: none;
    transition: all 0.2s;
}

.dw-grid-2 select:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

/* CHECKBOX */
.dw-xml-checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.dw-xml-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #10b981;
    cursor: pointer;
}

.dw-xml-checkbox-group label {
    font-size: 15px;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

/* BUTTONS */
.dw-action-bar {
    margin-top: auto; /* pushes button to bottom if card is tall */
}

button.dw-xml-btn-primary {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

button.dw-xml-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, #059669, #047857);
}

/* OUTPUT HEADER + BUTTONS */
.dw-xml-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.dw-xml-action-btns {
    display: flex;
    gap: 12px;
}

.dw-xml-btn-icon {
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid #1d4ed8;
    background: #2563eb;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dw-xml-btn-icon:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.dw-xml-btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* DARK IDE / PREVIEW AREA */
.dw-xml-ide-wrapper {
    background: #0f172a;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #1e293b;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
    flex-grow: 1;
    overflow-y: auto;
    max-height: 480px;
    margin-bottom: 20px;
}

.dw-xml-ide-wrapper pre {
    margin: 0;
    background: transparent;
    padding: 0;
}

.dw-xml-ide-wrapper code {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.65;
    color: #c9d1d9;
    white-space: pre-wrap;
    word-break: break-all;
}

.dw-xml-code-empty {
    color: #64748b !important;
    font-style: italic;
}

/* STATUS / STATS */
#dw-xml-status,
.dw-stats {
    font-size: 14px;
    color: #10b981;
    margin-top: 12px;
}

/* ==========================================
   RESPONSIVE - MOBILE FIRST ULTRA PRO
========================================== */

@media (max-width: 1023px) {
    .dw-xml-workspace {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .dw-xml-header h2 {
        font-size: 38px;
    }
}

@media (max-width: 767px) {
    .dw-xml-container {
        margin: 60px auto 80px;
        padding: 0 16px;
    }
    .dw-xml-header h2 {
        font-size: 32px;
    }
    .dw-card {
        padding: 24px;
    }
    textarea {
        min-height: 160px;
    }
    .dw-xml-ide-wrapper {
        max-height: 360px;
    }
    button.dw-xml-btn-primary {
        padding: 16px;
        font-size: 15.5px;
    }
}

@media (max-width: 480px) {
    .dw-xml-header {
        margin-bottom: 40px;
    }
    .dw-xml-header h2 {
        font-size: 28px;
    }
    .dw-xml-output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* ====================== SAAS PREMIUM EXTRA (Add at the bottom) ====================== */

/* LIVE URL COUNTER */
.dw-xml-url-counter {
    font-size: 14px;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    padding: 6px 16px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

/* SUCCESS / ERROR TOAST (SaaS feel) */
.dw-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: white;
    padding: 16px 26px;
    border-radius: 9999px;
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.35);
    font-weight: 700;
    font-size: 15px;
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 99999;
    animation: toastPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toastPop {
    0% { transform: translate(-50%, 80px); opacity: 0; }
    100% { transform: translateX(-50%); opacity: 1; }
}

/* GENERATE BUTTON SPINNER */
.dw-xml-btn-primary.loading {
    color: transparent !important;
    pointer-events: none;
}
.dw-xml-btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* Badge on top */
.dw-xml-badge {
    display: inline-block;
    background: linear-gradient(90deg, #10b981, #34d399);
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 9999px;
    letter-spacing: 0.6px;
    margin-bottom: 12px;
}