/* ── Yard Dog Web — app.css ── */

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--yd-black);
    background: var(--yd-white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Brand logos ── */
.yd-brand-logo {
    height: 32px;
    width: auto;
    vertical-align: middle;
    border-radius: 6px;
}
.yd-hero-logo {
    height: 120px;
    width: auto;
    margin-bottom: 1.5rem;
    border-radius: 12px;
}
.yd-auth-logo {
    height: 80px;
    width: auto;
    border-radius: 10px;
}

h1:focus { outline: none; }

/* ── Links ── */
a { color: var(--yd-accent); }
a:visited { color: var(--yd-accent); }
a:hover { color: var(--yd-background); }

/* ── Buttons ── */
.btn-yd {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--yd-btn-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: var(--yd-btn-shadow);
}
.btn-yd:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.btn-yd-primary {
    background: var(--yd-secondary);
    color: var(--yd-black) !important;
}
.btn-yd-outline {
    background: transparent;
    color: var(--yd-white);
    border: 2px solid var(--yd-white);
}
.btn-yd-outline:hover {
    background: rgba(255,255,255,0.15);
    color: var(--yd-white);
}
.btn-yd-accent {
    background: var(--yd-accent);
    color: var(--yd-black);
}
.btn-yd-danger {
    background: var(--yd-red);
    color: var(--yd-white);
}
.btn-yd-block { width: 100%; }

/* ── Cards ── */
.yd-card {
    background: var(--yd-card-bg);
    border-radius: var(--yd-card-radius);
    box-shadow: var(--yd-card-shadow);
    padding: 2rem;
}

/* ── Form controls ── */
.yd-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--yd-input-border);
    border-radius: var(--yd-btn-radius);
    background: var(--yd-input-bg);
    font-size: 1rem;
    color: var(--yd-black);
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.yd-input:focus {
    outline: none;
    border-color: var(--yd-accent);
    box-shadow: 0 0 0 3px rgba(91,106,191,0.2);
}
.yd-input::placeholder {
    color: var(--yd-placeholder);
}

/* ── Validation ── */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--yd-success);
}
.invalid {
    outline: 1px solid var(--yd-red);
}
.validation-message {
    color: var(--yd-red);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* ── Public nav — see yarddog-theme.css for full rules ── */

/* ── Hero ── */
.yd-hero {
    background:
        linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)),
        url('../images/yard_dog_banner.png') center / cover no-repeat;
    color: var(--yd-white);
    padding: 5rem 2rem;
    text-align: center;
}
.yd-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}
.yd-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}
.yd-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Feature grid ── */
.yd-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}
.yd-feature-card {
    background: var(--yd-card-bg);
    border-radius: var(--yd-card-radius);
    padding: 2rem;
    box-shadow: var(--yd-card-shadow);
    text-align: center;
}
.yd-feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.yd-feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}
.yd-feature-card p {
    color: var(--yd-subtle-text);
    font-size: 0.95rem;
}

/* ── Auth card (login / signup) ── */
.yd-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--yd-background);
    padding: 2rem;
}
.yd-auth-card {
    background: var(--yd-card-bg);
    border-radius: var(--yd-card-radius);
    box-shadow: var(--yd-card-shadow);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
}
.yd-auth-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 700;
}
.yd-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.yd-auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--yd-subtle-text);
}
.yd-auth-footer a { font-weight: 600; }
.yd-error-banner {
    background: var(--yd-error-bg);
    color: var(--yd-red);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}
.yd-fake-data-banner {
    background: rgba(255, 184, 156, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    color: var(--yd-black);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}
.yd-fake-data-banner strong {
    display: block;
    margin-bottom: 0.4rem;
}
.yd-fake-data-banner code {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    color: var(--yd-black);
    padding: 0.1rem 0.35rem;
}
.yd-success-banner {
    background: var(--yd-success-bg);
    color: var(--yd-success);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
}

/* ── Authenticated layout ── */
.yd-app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.yd-app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--yd-nav-height);
    padding: 0 2rem;
    background: var(--yd-background);
    color: var(--yd-white);
}
.yd-app-topbar a {
    color: var(--yd-white);
    text-decoration: none;
    font-weight: 500;
}
.yd-app-content {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* ── Dashboard cards ── */
.yd-dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.yd-dash-card {
    background: var(--yd-card-bg);
    border-radius: var(--yd-card-radius);
    box-shadow: var(--yd-card-shadow);
    padding: 1.5rem;
}
.yd-dash-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Billing ── */
.yd-billing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}
@media (max-width: 768px) {
    .yd-billing-grid { grid-template-columns: 1fr; }
}
.yd-billing-card {
    background: var(--yd-card-bg);
    border-radius: var(--yd-card-radius);
    box-shadow: var(--yd-card-shadow);
    padding: 1.5rem;
}
.yd-billing-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.yd-billing-card .yd-plan-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: var(--yd-accent);
    color: var(--yd-white);
    font-size: 0.8rem;
    font-weight: 600;
}
.yd-billing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.yd-billing-table th,
.yd-billing-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--yd-input-border);
}
.yd-billing-table th {
    font-weight: 600;
    color: var(--yd-subtle-text);
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* ── Footer ── */
.yd-footer {
    background: var(--yd-footer-bg);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 1.5rem 2rem;
    font-size: 0.85rem;
}

/* ── Inline confirmation ── */
.yd-confirm-panel {
    text-align: center;
}
.yd-confirm-panel p {
    margin-bottom: 1rem;
    color: var(--yd-subtle-text);
}
.yd-code-input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    max-width: 200px;
    margin: 0 auto;
}

/* ── Spinner ── */
.yd-spinner {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid var(--yd-placeholder);
    border-top-color: var(--yd-accent);
    border-radius: 50%;
    animation: yd-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.5rem;
}
@keyframes yd-spin {
    to { transform: rotate(360deg); }
}

/* ── Blazor error boundary ── */
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1.5rem;
    color: white;
    border-radius: 8px;
}
.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ── Notification bell ── */
.yd-notif-wrapper {
    position: relative;
}
.yd-notif-details {
    position: relative;
}
.yd-notif-details > summary {
    list-style: none;
    cursor: pointer;
    font-size: 1.3rem;
    position: relative;
    padding: 0.25rem;
    user-select: none;
}
.yd-notif-details > summary::-webkit-details-marker {
    display: none;
}
.yd-notif-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--yd-red);
    color: var(--yd-white);
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.yd-notif-dropdown {
    position: absolute;
    right: 0;
    top: 2.5rem;
    width: 340px;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    max-height: 400px;
    overflow-y: auto;
}

/* ── Responsive helpers ── */
@media (max-width: 720px) {
    .yd-hero h1 { font-size: 2rem; }
    .yd-hero { padding: 3rem 1.25rem; }
    .yd-auth-card { padding: 1.5rem; }
    .yd-app-topbar { padding: 0 1rem; }
    .yd-app-content { padding: 1rem; }
    .yd-app-topbar > div { gap: 0.75rem; }
    .yd-notif-dropdown { width: 290px; }
}