/* ═══════════════════════════════════════════
   PAGE LAYOUT — Full-height flex column
   ═══════════════════════════════════════════ */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}




/* ═══════════════════════════════════════════
   HERO HEADLINE (shared class from landing)
   ═══════════════════════════════════════════ */


.hero-headline {
    margin-bottom: 12px;
    color: var(--brand);
}


/* ═══════════════════════════════════════════
   HINT ROW — inline info note below subheading
   ═══════════════════════════════════════════ */
.hint-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 40px;
    padding-left: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.hint-icon {
    width: 15px;
    height: 15px;
    stroke: var(--text-muted);
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════
   DECLARATION TOOL
   ═══════════════════════════════════════════ */
.declaration-section {
    flex: 1;
    /* fill remaining height between header & footer */
    display: grid;
    place-items: center;
    padding: calc(64px + 40px) 20px 40px;
    /* top clears the fixed header */
    scroll-margin-top: 64px;
}

.declaration-inner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.declaration-subheading {
    margin-bottom: 16px;
}


/* TOOL SELECTION GRID */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 560px;
    margin: 0 auto 36px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: var(--shadow-sm);
    font-family: inherit;
}

.tool-card:hover {
    border-color: rgba(0, 85, 90, 0.3);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tool-card.selected {
    border-color: var(--brand);
    background: var(--brand-light);
    box-shadow: 0 0 0 3px rgba(0, 85, 90, 0.12), var(--shadow-md);
}

.tool-card.selected .tool-icon {
    stroke: var(--brand);
}

.tool-icon {
    width: 32px;
    height: 32px;
    stroke: var(--text-secondary);
    transition: stroke 0.2s ease;
}

.tool-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
}

/* GENERATE BUTTON */
.generate-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 560px;
    margin: 0 auto 36px;
    background: var(--brand);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.generate-button:hover {
    background: var(--brand-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.generate-button:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

/* Loading Spinner */
.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Generate inline validation */
.generate-error {
    max-width: 560px;
    margin: 12px auto 0;
    font-size: 13px;
    color: #df4759;
    line-height: 1.5;
    text-align: center;
}


/* ═══════════════════════════════════════════
   RESULTS SECTION
   ═══════════════════════════════════════════ */
.results-section {
    width: 100%;
    padding: 60px 20px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

.results-title {
    margin-bottom: 24px;
}

.table-wrapper {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 40px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: #f3f4f6;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    font-size: 14px;
    color: var(--text-primary);
}

.cell-name {
    min-width: 220px;
    flex: 1.5;
    word-break: break-word;
}

.cell-provider {
    min-width: 140px;
    flex: 1;
}

.cell-category {
    min-width: 120px;
    flex: 0.8;
}

.cell-duration {
    min-width: 100px;
    flex: 0.7;
}

.cell-desc {
    min-width: 250px;
    flex: 2;
}

.actions-cell {
    width: 100px;
    text-align: center;
    flex: none;
}

tr:last-child td {
    border-bottom: none;
}

/* Badge Styles */
.cookie-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    margin-bottom: 4px;
}

.badge-declared {
    border: 1px solid #10B981;
    color: #10B981;
    background: rgba(16, 185, 129, 0.05);
}

.badge-manual {
    border: 1px solid #1E40AF;
    color: #1E40AF;
    background: rgba(30, 64, 175, 0.05);
}

.name-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.cookie-name-text {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
}


/* ═══════════════════════════════════════════
   MANUAL AUDIT SECTION
   ═══════════════════════════════════════════ */
.manual-audit-section {
    background: var(--bg);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.manual-header {
    margin-bottom: 24px;
}

.manual-header h3 {
    margin-bottom: 8px;
}

.manual-disclaimer {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.btn-secondary {
    background: transparent;
    border: 1px dashed var(--brand);
    color: var(--brand);
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--brand-light);
}

.manual-form {
    margin-top: 24px;
    background: var(--bg-alt);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-input,
.form-select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(0, 85, 90, 0.1);
}

.form-row input {
    flex: 2;
}

.form-row select {
    flex: 1;
}

.full-width {
    width: 100%;
    margin-bottom: 16px;
}

/* Inline error state */
.input-group {
    flex: 2;
    display: flex;
    flex-direction: column;
}

.form-input.error,
.form-select.error {
    border-color: #df4759;
    box-shadow: 0 0 0 2px rgba(223, 71, 89, 0.12);
}

.field-error {
    margin: 6px 0 0;
    font-size: 13px;
    color: #df4759;
    line-height: 1.4;
}

.form-actions {
    display: flex;
    gap: 12px;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand);
    color: #ffffff;
    border: 2px solid var(--brand);
    padding: 15px 40px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
    text-align: center;
}

.btn-primary:hover {
    background: var(--brand-hover);
    border-color: var(--brand-hover);
    transform: translateY(-2px);
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
}

.btn-text:hover {
    color: var(--text-primary);
}

.btn-save-manual {
    background: transparent;
    border: 1.5px solid var(--brand);
    color: var(--brand);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save-manual:hover {
    background: var(--brand-light);
    transform: translateY(-1px);
}


/* ═══════════════════════════════════════════
   FOOTER override
   ═══════════════════════════════════════════ */
.site-footer {
    margin-top: 0;
    /* no extra gap; body flex handles spacing */
}



/* ═══════════════════════════════════════════
   DELETE CONFIRMATION BANNER
   ═══════════════════════════════════════════ */
.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.confirmation-banner {
    background: var(--bg);
    max-width: 440px;
    width: 100%;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.confirmation-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.confirmation-icon {
    width: 48px;
    height: 48px;
    color: #df4759;
    flex-shrink: 0;
}

.confirmation-text h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 20px;
    color: var(--text-primary);
}

.confirmation-text p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

.confirmation-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.btn-ghost-small {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ghost-small:hover {
    background: var(--bg-alt);
    border-color: #d1d5db;
    color: var(--text-primary);
}

.btn-danger-small {
    background: #df4759;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-small:hover {
    background: #c8394a;
    box-shadow: 0 4px 12px rgba(223, 71, 89, 0.2);
    transform: translateY(-1px);
}


/* ═══════════════════════════════════════════
   STEPS ACTION AREA
   ═══════════════════════════════════════════ */
.steps-action-area {
    padding-top: 40px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.warning-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 32px;
    text-align: center;
    justify-content: center;

}

.warning-icon {
    width: 24px;
    height: 24px;
    color: #d97706;
    flex-shrink: 0;
}

.warning-text {
    font-size: 15px;
    color: #92400e;
    line-height: 1.6;
    margin: 0;
}

.action-buttons {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
    flex-wrap: wrap;
}

.action-buttons>* {
    min-width: 260px;
    text-align: center;
}

.btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid var(--brand);
    color: var(--brand);
    padding: 15px 40px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
    text-align: center;
    cursor: pointer;
}

.btn-ghost:hover {
    background: var(--brand-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.slide-up-fade-in {
    animation: slideUpFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════
   TABLE ACTIONS & BUTTONS
   ═══════════════════════════════════════════ */
.actions-cell {
    white-space: nowrap;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-right: 4px;
}

.btn-action.btn-edit,
.btn-action.btn-save {
    color: var(--brand);
    /* Deep Sea Green #00555a */
}

.btn-edit:hover,
.btn-save:hover {
    border-color: var(--brand);
    background: var(--brand-light);
}

.btn-erase {
    color: #df4759;
    /* Muted danger red */
}

.btn-erase:hover {
    border-color: #df4759;
    background: #fff5f6;
}

/* Compact UI variants */
.btn-save.compact {
    width: auto;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
}

.edit-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--brand);
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    background: #fff;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Step 1 specific
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .declaration-section {
        padding: calc(64px + 32px) 20px 32px;
        /* 64px = navbar height */
    }

    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .tool-card {
        padding: 18px 12px;
    }

    .generate-button {
        font-size: 15px;
        padding: 14px 24px;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    /* Responsive Table — Card Layout */
    .table-wrapper {
        border: none;
        background: transparent;
        box-shadow: none;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        margin-bottom: 16px;
        padding: 8px;
        box-shadow: var(--shadow-sm);
    }

    td {
        border: none;
        border-bottom: 1px solid #f3f4f6;
        position: relative;
        padding-left: 50% !important;
        text-align: right !important;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    td:last-child {
        border-bottom: none;
    }

    td:before {
        content: attr(data-label);
        position: absolute;
        left: 16px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 700;
        font-size: 12px;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .cell-name {
        background: var(--brand-light);
        border-radius: 6px 6px 0 0;
        margin-bottom: 4px;
        font-weight: 700 !important;
    }

    .actions-cell {
        display: flex !important;
        justify-content: center !important;
        align-items: center;
        gap: 8px;
        padding: 12px 16px !important;
        background: #fcfcfc;
        border-radius: 0 0 6px 6px;
        margin-top: 4px;
        width: 100%;
    }

    .actions-cell:before {
        display: none !important;
    }

    .btn-action {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    /* Manual Form Responsiveness */
    .manual-audit-section {
        padding: 24px 16px;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
    }

    .input-group,
    .form-input,
    .form-select {
        width: 100% !important;
        flex: none !important;
    }

    .form-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }

    .btn-save-manual,
    .btn-text {
        width: 100%;
        padding: 14px;
        text-align: center;
    }
}