/* GRAPEIT™ Website Styles */
/* Brand Design System Implementation */

html, body {
    font-family: var(--font-family-base, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue', Arial, sans-serif);
    color: var(--color-text-primary, #2C3E50);
    background-color: var(--color-background, #FFFFFF);
    line-height: var(--line-height-base, 1.6);
    margin: 0;
    padding: 0;
}

* {
    box-sizing: border-box;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold, 700);
    line-height: var(--line-height-tight, 1.2);
    margin-top: 0;
}

h1 {
    font-size: var(--text-5xl, 3rem);
}

h2 {
    font-size: var(--text-4xl, 2.25rem);
}

h3 {
    font-size: var(--text-3xl, 1.75rem);
}

h4 {
    font-size: var(--text-2xl, 1.5rem);
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: var(--brand-coral, #F58860);
    text-decoration: none;
    transition: color var(--transition-base, 200ms ease-in-out);
}

a:hover {
    color: var(--color-hover, #E67850);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: var(--text-base, 1rem);
    font-weight: var(--font-weight-semibold, 600);
    border-radius: var(--radius-base, 8px);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base, 200ms ease-in-out);
    white-space: nowrap;
}

.btn-primary-brand {
    background: var(--brand-coral, #F58860);
    color: var(--brand-white, #FFFFFF);
    border: 2px solid transparent;
}

.btn-primary-brand:hover {
    background: var(--color-hover, #E67850);
    color: var(--brand-white, #FFFFFF);
    transform: translateY(-2px);
    box-shadow: var(--shadow-brand, 0 4px 16px rgba(245, 136, 96, 0.3));
}

.btn-secondary-brand {
    background: var(--brand-white, #FFFFFF);
    color: var(--brand-navy, #2C3E50);
    border: 2px solid var(--brand-navy, #2C3E50);
}

.btn-secondary-brand:hover {
    background: var(--brand-navy, #2C3E50);
    color: var(--brand-white, #FFFFFF);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 32px;
    font-size: var(--text-lg, 1.125rem);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    font-size: 1.2em;
}

/* Forms */
.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: var(--text-base, 1rem);
    border: 1px solid var(--gray-300, #D1D5DB);
    border-radius: var(--radius-base, 8px);
    transition: all var(--transition-base, 200ms ease-in-out);
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-coral, #F58860);
    box-shadow: 0 0 0 3px rgba(245, 136, 96, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400, #9CA3AF);
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success-green, #27AE60);
}

.invalid {
    outline: 1px solid var(--error-red, #E74C3C);
}

.validation-message {
    color: var(--error-red, #E74C3C);
    font-size: var(--text-sm, 0.875rem);
    margin-top: 4px;
}

/* Error UI */
.blazor-error-boundary {
    background: var(--error-red, #E74C3C);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

#blazor-error-ui {
    background: var(--error-red, #E74C3C);
    color: white;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }
.p-5 { padding: 48px; }

/* Focus States */
:focus-visible {
    outline: 2px solid var(--brand-coral, #F58860);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--brand-coral, #F58860);
    color: var(--brand-white, #FFFFFF);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100, #F3F4F6);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400, #9CA3AF);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500, #6B7280);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid var(--gray-200, #E5E7EB);
    border-top-color: var(--brand-coral, #F58860);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
}
