/* ========================================
   GLOBAL STANDARDIZED CSS - HTML ELEMENTS ONLY
   ======================================== */

/* CSS Reset & Base Styles */
* {
    box-sizing: border-box;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #374151;
    background-color: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    line-height: 1.25;
}

h1 { font-size: 2.25rem; } /* 36px */
h2 { font-size: 1.875rem; } /* 30px */
h3 { font-size: 1.5rem; } /* 24px */
h4 { font-size: 1.25rem; } /* 20px */
h5 { font-size: 1.125rem; } /* 18px */
h6 { font-size: 1rem; } /* 16px */

p {
    margin: 0 0 1rem 0;
}

a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Code & Pre */
code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    background-color: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

pre {
    display: block;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    background-color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0 0 1rem 0;
}

pre code {
    background: none;
    padding: 0;
}

/* Lists */
ul, ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.25rem;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    font-weight: 600;
    background-color: #f9fafb;
    color: #374151;
}

/* Form Elements */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input, textarea, select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input[type="checkbox"], input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
}

label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

fieldset {
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 0 0 1rem 0;
}

legend {
    font-weight: 600;
    color: #374151;
    padding: 0 0.5rem;
}

/* Blockquote */
blockquote {
    margin: 0 0 1rem 0;
    padding: 0 1rem;
    border-left: 4px solid #e5e7eb;
    color: #6b7280;
    font-style: italic;
}

/* Horizontal Rule */
hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
}

/* Small Text */
small {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Strong and Emphasis */
strong, b {
    font-weight: 600;
}

em, i {
    font-style: italic;
}

/* Mark/Highlight */
mark {
    background-color: #fef3c7;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

/* Del and Ins */
del {
    text-decoration: line-through;
    color: #6b7280;
}

ins {
    text-decoration: underline;
    background-color: #d1fae5;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

/* Documentation Styling */
#docs-content {
    max-width: none;
    line-height: 1.7;
    color: #374151;
}

#docs-content h1,
#docs-content h2,
#docs-content h3,
#docs-content h4,
#docs-content h5,
#docs-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

#docs-content h1 {
    font-size: 2.25rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
    margin-top: 0;
}

#docs-content h2 {
    font-size: 1.875rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.25rem;
}

#docs-content h3 {
    font-size: 1.5rem;
}

#docs-content h4 {
    font-size: 1.25rem;
}

#docs-content h5 {
    font-size: 1.125rem;
}

#docs-content h6 {
    font-size: 1rem;
    color: #6b7280;
}

#docs-content p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

#docs-content p:last-child {
    margin-bottom: 0;
}

#docs-content em {
    font-style: italic;
    color: #6b7280;
}

#docs-content strong {
    font-weight: 600;
}

#docs-content ul,
#docs-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

#docs-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

#docs-content li:last-child {
    margin-bottom: 0;
}

#docs-content ol {
    counter-reset: item;
}

#docs-content ol > li {
    display: block;
    position: relative;
    padding-left: 2rem;
}

#docs-content ol > li::before {
    content: counter(item) ".";
    counter-increment: item;
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 600;
    color: #3b82f6;
}

#docs-content ul > li::before {
    content: "•";
    color: #3b82f6;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

#docs-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background-color: #f8fafc;
    border-left: 4px solid #3b82f6;
    border-radius: 0 0.375rem 0.375rem 0;
    font-style: italic;
    color: #4b5563;
}

#docs-content blockquote p {
    margin-bottom: 0;
}

#docs-content blockquote p:not(:last-child) {
    margin-bottom: 0.5rem;
}

#docs-content code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875em;
    background-color: #f1f5f9;
    color: #e11d48;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    border: 1px solid #e2e8f0;
}

#docs-content pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #334155;
}

#docs-content pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
    font-size: 0.875rem;
}

#docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

#docs-content th,
#docs-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

#docs-content th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

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

#docs-content tr:hover {
    background-color: #f8fafc;
}

#docs-content a {
    color: #3b82f6;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
}

#docs-content a:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

#docs-content hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2rem 0;
}

#docs-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

#docs-content .highlight {
    background-color: #fef3c7;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
}

#docs-content .note {
    background-color: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

#docs-content .note::before {
    content: "💡 Note: ";
    font-weight: 600;
    color: #1e40af;
}

#docs-content .warning {
    background-color: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

#docs-content .warning::before {
    content: "⚠️ Warning: ";
    font-weight: 600;
    color: #92400e;
}

#docs-content .success {
    background-color: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

#docs-content .success::before {
    content: "✅ Success: ";
    font-weight: 600;
    color: #065f46;
}

#docs-content .error {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

#docs-content .error::before {
    content: "❌ Error: ";
    font-weight: 600;
    color: #991b1b;
}

/* Form Styling - Tailwind Compatible */
.form-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin: 16px 0;
    max-width: 400px;
}

.form-fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.form-field {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background-color: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input:invalid {
    border-color: #ef4444;
}

.form-input:invalid:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background-color: #ffffff;
    resize: vertical;
    min-height: 100px;
}

.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background-color: #ffffff;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-checkbox,
.form-radio {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    accent-color: #3b82f6;
}

.form-checkbox-label,
.form-radio-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.form-button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.form-button:hover {
    background: #2563eb;
}

.form-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.form-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.form-button-secondary {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.form-button-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.form-button-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.form-button-danger:hover {
    background: #dc2626;
}

.form-error {
    color: #ef4444;
    font-size: 14px;
    margin-top: 4px;
}

.form-help {
    color: #6b7280;
    font-size: 14px;
    margin-top: 4px;
}

.form-group {
    margin-bottom: 20px;
}

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

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

/* Password form specific styles (matching your existing styles) */
.password-form {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin: 16px 0;
    max-width: 400px;
}

.password-form fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.password-form .field {
    margin-bottom: 16px;
}

.password-form label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.password-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.password-form input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.password-form input[type="submit"] {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    margin-top: 16px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.password-form input[type="submit"]:hover {
    background: #2563eb;
}

.password-form input[type="submit"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}