/*
 * DocketDoor Portal - Public Styles
 * Portal, Pricing, Report, Registry, Guidance pages
 * Version: 2.2.2
 */

/* ---------------------------------------------------------------------------
   Shared base: buttons
--------------------------------------------------------------------------- */

.dd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    line-height: 1.2;
    transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}

.dd-btn:disabled,
.dd-btn.loading {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.dd-btn-primary {
    background: #1E1E1E;
    color: #fff;
    border: 1px solid #1E1E1E;
}

.dd-btn-primary:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

.dd-btn-secondary {
    background: transparent;
    color: #1E1E1E;
    border: 1px solid #1E1E1E;
}

.dd-btn-secondary:hover {
    background: #F2F0EC;
    color: #1E1E1E;
}

/* ---------------------------------------------------------------------------
   Shared: form messages
--------------------------------------------------------------------------- */

.dd-form-message {
    min-height: 1.5rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.dd-form-message.error {
    color: #c0392b;
}

.dd-form-message.success {
    color: #27ae60;
}

/* ---------------------------------------------------------------------------
   Shared: field base
--------------------------------------------------------------------------- */

.dd-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.dd-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.3rem;
}

.dd-field input[type="text"],
.dd-field input[type="email"],
.dd-field input[type="password"],
.dd-field input[type="tel"],
.dd-field input[type="number"],
.dd-field select,
.dd-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    color: #1E1E1E;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}

.dd-field input:focus,
.dd-field select:focus,
.dd-field textarea:focus {
    outline: none;
    border-color: #A8B89C;
    box-shadow: 0 0 0 3px rgba(168, 184, 156, 0.2);
}

.dd-field-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dd-field-row .dd-field {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .dd-field-row {
        flex-direction: column;
        gap: 0;
    }

    .dd-field-row .dd-field {
        margin-bottom: 1rem;
    }
}

/* ---------------------------------------------------------------------------
   PORTAL
--------------------------------------------------------------------------- */

.dd-portal-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.dd-portal-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dd-portal-header h1,
.dd-portal-header h2 {
    margin: 0;
}

/* Member badge */

.dd-member-badge {
    display: inline-block;
    padding: 0.25em 0.75em;
    border-radius: 3px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.dd-member-badge.basic {
    background: #F2F0EC;
    color: #1E1E1E;
    border: 1px solid #d0cdc8;
}

.dd-member-badge.pro {
    background: #A8B89C;
    color: #fff;
}

.dd-member-badge.unlimited {
    background: #1E1E1E;
    color: #fff;
}

/* Portal stats */

.dd-portal-stats {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.dd-portal-stat {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.75rem 1.25rem;
    background: #fff;
    min-width: 120px;
}

.dd-portal-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1E1E1E;
    line-height: 1;
}

.dd-portal-stat-label {
    font-size: 0.8125rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Portal actions */

.dd-portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Portal reports table */

.dd-portal-reports {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.dd-portal-reports th {
    text-align: left;
    padding: 0.625rem 0.875rem;
    background: #F2F0EC;
    border-bottom: 2px solid #d0cdc8;
    font-weight: 600;
    font-size: 0.875rem;
    color: #1E1E1E;
    white-space: nowrap;
}

.dd-portal-reports td {
    padding: 0.5rem 0.875rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.dd-portal-reports tbody tr:nth-child(odd) td {
    background: #fafafa;
}

.dd-portal-reports tbody tr:hover td {
    background: #f5f5f5;
}

/* ---------------------------------------------------------------------------
   PRICING
--------------------------------------------------------------------------- */

.dd-pricing-wrap {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
    padding: 1.5rem 1rem;
}

.dd-pricing-intro {
    font-size: 1.0625rem;
    color: #555;
    margin-bottom: 2rem;
}

.dd-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 740px) {
    .dd-pricing-grid {
        grid-template-columns: 1fr;
    }
}

.dd-pricing-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
    background: #fff;
    text-align: left;
    transition: box-shadow 0.15s;
}

.dd-pricing-card.featured {
    border: 2px solid #A8B89C;
    box-shadow: 0 4px 20px rgba(168, 184, 156, 0.25);
}

.dd-featured-label {
    display: inline-block;
    background: #A8B89C;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2em 0.6em;
    border-radius: 3px;
    margin-bottom: 0.75rem;
}

.dd-plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1E1E1E;
    margin: 0 0 0.5rem;
}

.dd-plan-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1E1E1E;
    line-height: 1;
    margin: 0.5rem 0 1rem;
}

.dd-plan-price span {
    font-size: 1rem;
    font-weight: 400;
    color: #666;
}

.dd-plan-description {
    font-size: 0.9375rem;
    color: #555;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.dd-plan-features {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    text-align: left;
    flex: 1;
}

.dd-plan-features li {
    font-size: 0.9375rem;
    color: #333;
    padding: 0.375rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.dd-plan-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #A8B89C;
    font-weight: 700;
}

.dd-btn-checkout {
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
    background: #1E1E1E;
    color: #fff;
    border: 1px solid #1E1E1E;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    display: block;
    transition: background 0.15s, border-color 0.15s;
}

.dd-btn-checkout:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

.dd-btn-checkout:disabled,
.dd-btn-checkout.loading {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.dd-checkout-message {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    min-height: 1.25rem;
    color: #c0392b;
}

.dd-checkout-message.success {
    color: #27ae60;
}

/* ---------------------------------------------------------------------------
   REPORT
--------------------------------------------------------------------------- */

.dd-report-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.dd-search-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.dd-search-form-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1E1E1E;
    margin: 0 0 1rem;
}

.dd-field-sm {
    max-width: 120px;
}

.dd-field-lg {
    flex: 1;
}

.dd-report-results {
    margin-top: 2rem;
}

/* Risk badge */

.dd-risk-badge {
    display: inline-block;
    padding: 0.4em 1em;
    border-radius: 4px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.dd-risk-badge.LOW {
    background: #e6f4ea;
    color: #1e7e34;
}

.dd-risk-badge.MODERATE {
    background: #fff3cd;
    color: #856404;
}

.dd-risk-badge.ELEVATED {
    background: #ffe5d0;
    color: #c45600;
}

.dd-risk-badge.HIGH {
    background: #fde8e8;
    color: #c0392b;
}

/* Report summary */

.dd-report-summary {
    background: #F2F0EC;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.dd-report-summary-item {
    display: flex;
    flex-direction: column;
}

.dd-report-summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E1E1E;
}

.dd-report-summary-label {
    font-size: 0.8125rem;
    color: #666;
}

/* Report flags */

.dd-report-flags {
    margin-bottom: 1.5rem;
}

.dd-report-flags h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.dd-report-flags ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dd-report-flags ul li {
    padding: 0.5rem 0.75rem;
    border-left: 3px solid #c0392b;
    background: #fde8e8;
    margin-bottom: 0.375rem;
    border-radius: 0 4px 4px 0;
    font-size: 0.9375rem;
    color: #7b1e1e;
}

.dd-report-flags ul li.flag-moderate {
    border-left-color: #f0a500;
    background: #fff8e6;
    color: #7b5800;
}

/* Report entries table */

.dd-report-entries {
    margin-bottom: 1.5rem;
}

.dd-report-entries h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.dd-report-entries table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.dd-report-entries th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: #F2F0EC;
    border-bottom: 2px solid #d0cdc8;
    font-weight: 600;
    white-space: nowrap;
}

.dd-report-entries td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.dd-report-entries tbody tr:nth-child(odd) td {
    background: #fafafa;
}

/* ---------------------------------------------------------------------------
   REGISTRY - Submit form
--------------------------------------------------------------------------- */

.dd-registry-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    max-width: 720px;
    margin: 0 auto;
}

.dd-registry-form-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1E1E1E;
    margin: 0 0 1.25rem;
}

/* ---------------------------------------------------------------------------
   REGISTRY - Browse
--------------------------------------------------------------------------- */

.dd-registry-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.dd-registry-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    color: #555;
}

.dd-registry-stats strong {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1E1E1E;
    display: block;
}

.dd-registry-search {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.dd-registry-search .dd-field {
    margin-bottom: 0;
    min-width: 180px;
}

.dd-registry-table-wrap {
    overflow-x: auto;
}

.dd-registry-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.dd-registry-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.dd-registry-table th {
    text-align: left;
    padding: 0.625rem 0.875rem;
    background: #1E1E1E;
    color: #F2F0EC;
    font-weight: 600;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.dd-registry-table td {
    padding: 0.5rem 0.875rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.dd-registry-table tbody tr:nth-child(odd) td {
    background: #fafafa;
}

.dd-registry-table tbody tr:hover td {
    background: #f0efec;
}

/* ---------------------------------------------------------------------------
   GUIDANCE ENGINE
--------------------------------------------------------------------------- */

.dd-guidance-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.dd-guidance-breadcrumb {
    font-size: 0.8125rem;
    color: #888;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.dd-guidance-breadcrumb span {
    color: #1E1E1E;
    font-weight: 500;
}

.dd-guidance-question h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E1E1E;
    margin: 0 0 1.25rem;
    line-height: 1.3;
}

.dd-guidance-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.dd-guidance-btn {
    width: 100%;
    text-align: left;
    padding: 1rem 1.25rem;
    border: 1px solid #A8B89C;
    border-radius: 4px;
    background: #fff;
    color: #1E1E1E;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
}

.dd-guidance-btn:hover {
    background: #A8B89C;
    color: #fff;
    border-color: #A8B89C;
}

/* Result card */

.dd-guidance-result {
    background: #edf6f0;
    border: 1px solid #b8dbc3;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.dd-guidance-result-notice {
    display: inline-block;
    background: #27ae60;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.25em 0.75em;
    border-radius: 3px;
    margin-bottom: 0.75rem;
}

.dd-guidance-result h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1E1E1E;
    margin: 0 0 0.75rem;
}

.dd-guidance-result-rta {
    font-size: 0.875rem;
    color: #555;
    margin-bottom: 1rem;
    font-style: italic;
}

.dd-guidance-result-section {
    margin-bottom: 1rem;
}

.dd-guidance-result-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #27ae60;
    margin: 0 0 0.5rem;
}

.dd-guidance-result-section ol {
    margin: 0;
    padding-left: 1.25rem;
}

.dd-guidance-result-section ol li,
.dd-guidance-result-section ul li {
    font-size: 0.9375rem;
    color: #333;
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.dd-guidance-result-section ul {
    list-style: disc;
    margin: 0;
    padding-left: 1.25rem;
}

.dd-guidance-result-tip {
    background: #fff;
    border-left: 3px solid #A8B89C;
    padding: 0.75rem 1rem;
    border-radius: 0 4px 4px 0;
    margin-top: 1rem;
}

.dd-guidance-result-tip p {
    margin: 0;
    font-size: 0.9rem;
    color: #444;
    font-style: italic;
}

.dd-guidance-restart {
    margin-top: 1.25rem;
}

/* Guidance index table */

.dd-guidance-index table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.dd-guidance-index th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: #F2F0EC;
    border-bottom: 2px solid #d0cdc8;
    font-weight: 600;
}

.dd-guidance-index td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.dd-guidance-index tbody tr:nth-child(odd) td {
    background: #fafafa;
}

/* Honeypot */

.dd-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Loading indicator
--------------------------------------------------------------------------- */

.dd-loading {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: dd-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.375rem;
}

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

/* ---------------------------------------------------------------------------
   Responsive utilities
--------------------------------------------------------------------------- */

@media (max-width: 600px) {
    .dd-portal-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dd-portal-stats {
        flex-direction: column;
    }

    .dd-pricing-card {
        padding: 1.5rem;
    }

    .dd-search-form {
        padding: 1rem;
    }

    .dd-registry-search {
        flex-direction: column;
        align-items: stretch;
    }

    .dd-registry-search .dd-field {
        min-width: unset;
    }
}
