/* Version: 20250908.1122 */
/* Pico.css with Corporate Theme Override */

/* ============================================
   IMPORT PICO.CSS FROM CDN
   ============================================ */
@import url('https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css');

/* ============================================
   IMPORT CORPORATE FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700&family=Ubuntu+Mono:wght@400;700&display=swap');

/* ============================================
   PICO.CSS CORPORATE THEME OVERRIDES
   ============================================ */
:root {
    /* Override Pico's color scheme with corporate colors */
    --pico-color: #000000;
    --pico-background-color: #ffffff;

    /* Primary colors */
    --pico-primary: #a6192e;
    --pico-primary-background: #a6192e;
    --pico-primary-border: #a6192e;
    --pico-primary-underline: rgba(166, 25, 46, 0.5);
    --pico-primary-hover: #cc0633;
    --pico-primary-hover-background: #cc0633;
    --pico-primary-hover-border: #cc0633;
    --pico-primary-hover-underline: rgba(204, 6, 51, 0.75);
    --pico-primary-focus: rgba(166, 25, 46, 0.125);
    --pico-primary-inverse: #ffffff;

    /* Typography - Corporate font stack */
    --pico-font-family: 'Barlow Condensed', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --pico-font-family-monospace: 'Ubuntu Mono', Menlo, Consolas, 'Courier New', monospace;

    /* Muted colors */
    --pico-muted-color: #414042;
    --pico-muted-border-color: #e0e0e0;

    /* Card and form elements */
    --pico-card-background-color: #ffffff;
    --pico-card-border-color: #e0e0e0;
    --pico-card-box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    --pico-card-sectioning-background-color: #f8f9fa;

    /* Form elements */
    --pico-form-element-background-color: #f8f9fa;
    --pico-form-element-border-color: #e0e0e0;
    --pico-form-element-color: #000000;
    --pico-form-element-placeholder-color: #414042;
    --pico-form-element-active-background-color: #ffffff;
    --pico-form-element-active-border-color: #a6192e;
    --pico-form-element-focus-color: #a6192e;
    --pico-form-element-disabled-opacity: 0.5;
    --pico-form-element-invalid-border-color: #cc0633;
    --pico-form-element-invalid-active-border-color: #a6192e;
    --pico-form-element-invalid-focus-color: #cc0633;
    --pico-form-element-valid-border-color: #00c851;
    --pico-form-element-valid-active-border-color: #00a846;
    --pico-form-element-valid-focus-color: #00c851;

    /* Switch/Toggle */
    --pico-switch-background-color: #e0e0e0;
    --pico-switch-checked-background-color: #a6192e;
    --pico-switch-color: #ffffff;

    /* Secondary colors */
    --pico-secondary: #414042;
    --pico-secondary-background: #414042;
    --pico-secondary-border: #414042;
    --pico-secondary-underline: rgba(65, 64, 66, 0.5);
    --pico-secondary-hover: #000000;
    --pico-secondary-hover-background: #000000;
    --pico-secondary-hover-border: #000000;
    --pico-secondary-hover-underline: rgba(0, 0, 0, 0.75);
    --pico-secondary-focus: rgba(65, 64, 66, 0.125);
    --pico-secondary-inverse: #ffffff;

    /* Contrast colors */
    --pico-contrast: #000000;
    --pico-contrast-background: #000000;
    --pico-contrast-border: #000000;
    --pico-contrast-underline: rgba(0, 0, 0, 0.5);
    --pico-contrast-hover: #414042;
    --pico-contrast-hover-background: #414042;
    --pico-contrast-hover-border: #414042;
    --pico-contrast-hover-underline: rgba(65, 64, 66, 0.75);
    --pico-contrast-focus: rgba(0, 0, 0, 0.125);
    --pico-contrast-inverse: #ffffff;

    /* Box shadow */
    --pico-box-shadow: 0 2px 8px rgba(166, 25, 46, 0.1);

    /* Border radius */
    --pico-border-radius: 0.5rem;

    /* Spacing */
    --pico-spacing: 1rem;

    /* Transitions */
    --pico-transition: 0.3s ease-in-out;
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --pico-background-color: #1a1a1a;
        --pico-color: #ffffff;
        --pico-primary: #cc0633;
        --pico-primary-hover: #a6192e;
        --pico-muted-color: #b0b0b0;
        --pico-muted-border-color: #414042;
        --pico-card-background-color: #2a2a2a;
        --pico-card-border-color: #414042;
        --pico-form-element-background-color: #2a2a2a;
        --pico-form-element-border-color: #414042;
        --pico-form-element-color: #ffffff;
        --pico-form-element-placeholder-color: #b0b0b0;
        --pico-form-element-active-background-color: #1a1a1a;
    }
}

[data-theme="dark"] {
    --pico-background-color: #1a1a1a;
    --pico-color: #ffffff;
    --pico-primary: #cc0633;
    --pico-primary-hover: #a6192e;
    --pico-muted-color: #b0b0b0;
    --pico-muted-border-color: #414042;
    --pico-card-background-color: #2a2a2a;
    --pico-card-border-color: #414042;
    --pico-form-element-background-color: #2a2a2a;
    --pico-form-element-border-color: #414042;
    --pico-form-element-color: #ffffff;
    --pico-form-element-placeholder-color: #b0b0b0;
    --pico-form-element-active-background-color: #1a1a1a;
}

/* ============================================
   ADDITIONAL CORPORATE STYLES
   ============================================ */

/* Gradient backgrounds for special elements */
.gradient-header,
[role="banner"] {
    background: linear-gradient(135deg, #a6192e 0%, #cc0633 100%) !important;
    color: #ffffff !important;
}

.gradient-button {
    background: linear-gradient(135deg, #a6192e 0%, #cc0633 100%) !important;
    border: none !important;
    color: #ffffff !important;
}

.gradient-button:hover {
    background: linear-gradient(135deg, #cc0633 0%, #a6192e 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(166, 25, 46, 0.3);
}

.gradient-button.success {
    background: linear-gradient(135deg, #00c851 0%, #00a846 100%) !important;
}

/* Typography adjustments */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--pico-font-family);
    color: var(--pico-secondary);
    font-weight: 700;
}

/* Button enhancements - only for buttons without specific classes */
button:not(.btn):not(.remove-btn),
input[type="submit"]:not(.btn):not(.remove-btn),
input[type="button"]:not(.btn):not(.remove-btn),
[role="button"]:not(.btn):not(.remove-btn) {
    font-family: var(--pico-font-family);
    font-weight: 600;
    transition: all 0.3s ease;
}

button:not(.secondary):not(.contrast):not(.outline):not(.btn):not(.remove-btn),
input[type="submit"]:not(.secondary):not(.contrast):not(.outline):not(.btn):not(.remove-btn),
input[type="button"]:not(.secondary):not(.contrast):not(.outline):not(.btn):not(.remove-btn) {
    background: linear-gradient(135deg, #a6192e 0%, #cc0633 100%);
    border: none;
}

button:not(.secondary):not(.contrast):not(.outline):not(.btn):not(.remove-btn):hover,
input[type="submit"]:not(.secondary):not(.contrast):not(.outline):not(.btn):not(.remove-btn):hover,
input[type="button"]:not(.secondary):not(.contrast):not(.outline):not(.btn):not(.remove-btn):hover {
    background: linear-gradient(135deg, #cc0633 0%, #a6192e 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(166, 25, 46, 0.3);
}

/* Card styling */
article {
    box-shadow: 0 2px 8px rgba(166, 25, 46, 0.1);
    transition: box-shadow 0.3s ease;
}

article:hover {
    box-shadow: 0 5px 15px rgba(166, 25, 46, 0.2);
}

/* Navigation styling */
nav {
    font-family: var(--pico-font-family);
    font-weight: 600;
}

nav a {
    transition: all 0.3s ease;
}

nav a:hover {
    color: var(--pico-primary-hover);
}

/* Table enhancements */
table {
    font-family: var(--pico-font-family);
}

thead {
    background: linear-gradient(135deg, rgba(166, 25, 46, 0.05) 0%, rgba(204, 6, 51, 0.05) 100%);
}

/* Code blocks */
pre, code, kbd, samp {
    font-family: var(--pico-font-family-monospace);
}

/* Progress bars */
progress {
    accent-color: var(--pico-primary);
}

progress::-webkit-progress-value {
    background: linear-gradient(135deg, #a6192e 0%, #cc0633 100%);
}

progress::-moz-progress-bar {
    background: linear-gradient(135deg, #a6192e 0%, #cc0633 100%);
}

/* Checkbox label improvements */
fieldset .grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    max-width: 100%;
}

@media (min-width: 992px) {
    fieldset .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    fieldset .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

fieldset label input[type="checkbox"] {
    margin-right: 0.5rem;
}

fieldset label small {
    display: block;
    line-height: 1.3;
    margin-top: 0.25rem;
    margin-left: 1.75rem;
    opacity: 0.8;
}

/* Custom component styles */
.header-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toolbar-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.status-badge {
    background: var(--pico-secondary-background);
    color: white;
    font-family: var(--pico-font-family);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.status-badge.success {
    background: #4caf50;
}

.status-badge.error {
    background: #f44336;
}

.text-success {
    color: var(--pico-primary) !important;
}

.text-error {
    color: var(--pico-form-element-invalid-focus-color) !important;
}

.config-textarea {
    font-family: var(--pico-font-family-monospace);
}

/* Syntax highlighting integration */
.syntax-highlight-wrapper {
    position: relative;
    border-radius: var(--pico-border-radius);
    overflow: hidden;
    border: 2px solid #e0e0e0;
    transition: all var(--pico-transition);
}

.syntax-highlight-wrapper:focus-within {
    border-color: var(--pico-primary);
    box-shadow: var(--pico-box-shadow);
}

.syntax-highlight-wrapper pre {
    margin: 0;
    background: #2d3748 !important;
    font-family: var(--pico-font-family-monospace);
    font-size: 0.7rem;
    line-height: 1.4;
    max-height: 600px;
    overflow-y: auto;
    padding: 1rem;
}

.syntax-highlight-wrapper pre code {
    background: transparent !important;
    color: #e2e8f0 !important;
    font-family: var(--pico-font-family-monospace);
    font-size: 0.7rem !important;
}

/* Prism.js theme overrides for corporate colors */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #718096 !important;
}

.token.punctuation {
    color: #e2e8f0 !important;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
    color: var(--pico-primary) !important;
}

.token.boolean,
.token.number {
    color: #63b3ed !important;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #68d391 !important;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
    color: #ed8936 !important;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
    color: #f6e05e !important;
}

.token.keyword {
    color: #9f7aea !important;
}

.token.regex,
.token.important {
    color: var(--pico-primary-hover) !important;
}

/* Custom file input styling */
.file-input-wrapper {
    position: relative;
    display: inline-block;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-input-button {
    display: inline-block;
    padding: var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal);
    background: var(--pico-primary-background);
    color: var(--pico-primary-inverse);
    border-radius: var(--pico-border-radius);
    font-family: var(--pico-font-family);
    font-weight: 600;
    cursor: pointer;
    transition: var(--pico-transition);
    position: relative;
    z-index: 1;
}

.file-input-wrapper:hover .file-input-button {
    background: var(--pico-primary-hover-background);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(166, 25, 46, 0.3);
}

/* Utility classes */
.corporate-primary {
    color: var(--pico-primary) !important;
}

.corporate-bg-primary {
    background-color: var(--pico-primary) !important;
    color: #ffffff !important;
}

.corporate-gradient {
    background: linear-gradient(135deg, #a6192e 0%, #cc0633 100%) !important;
    color: #ffffff !important;
}

/* ============================================
   GETOPT GENERATOR SPECIFIC STYLES
   ============================================ */

/* Container and layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header styling */
.header {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #a6192e 0%, #cc0633 100%);
    color: white;
    border-radius: var(--pico-border-radius) var(--pico-border-radius) 0 0;
}

.header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.header p {
    margin: 0.5rem 0 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Content sections */
.content {
    padding: 2rem;
}

.section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pico-secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--pico-primary);
}

/* Table styling */
.table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: var(--pico-border-radius);
    box-shadow: var(--pico-box-shadow);
    position: relative;
}

.options-table {
    width: 100%;
    min-width: 600px;
    margin: 0;
    border-collapse: collapse;
    background: white;
}

.options-table th {
    background: linear-gradient(135deg, rgba(166, 25, 46, 0.05) 0%, rgba(204, 6, 51, 0.05) 100%);
    color: var(--pico-secondary);
    font-weight: 700;
    padding: 1rem 0.75rem;
    text-align: left;
    border-bottom: 2px solid var(--pico-muted-border-color);
}

.options-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--pico-muted-border-color);
    vertical-align: middle;
}

.options-table input,
.options-table select {
    margin: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--pico-form-element-border-color);
    border-radius: var(--pico-border-radius);
    background: var(--pico-form-element-background-color);
    color: var(--pico-form-element-color);
    font-size: 0.875rem;
    transition: all var(--pico-transition);
    width: 100%;
    min-height: auto;
    height: auto;
    line-height: 1.2;
}

/* Fix select dropdown arrow */
.options-table select {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23414042' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.options-table input:focus,
.options-table select:focus {
    border-color: var(--pico-form-element-active-border-color);
    background: var(--pico-form-element-active-background-color);
    box-shadow: 0 0 0 3px var(--pico-primary-focus);
    outline: none;
}

.options-table input.error {
    border-color: var(--pico-form-element-invalid-border-color);
    background-color: rgba(204, 6, 51, 0.05);
}

/* Input width constraints */
.short-input { max-width: 80px; }
.long-input { max-width: 150px; }
.var-input { max-width: 120px; }
.desc-input { min-width: 200px; }

/* Remove button */
.remove-btn {
    background: var(--pico-form-element-invalid-border-color);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: var(--pico-border-radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all var(--pico-transition);
}

.remove-btn:hover {
    background: var(--pico-form-element-invalid-focus-color);
    transform: translateY(-1px);
}

/* Button styling */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--pico-border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pico-transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #a6192e 0%, #cc0633 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #cc0633 0%, #a6192e 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(166, 25, 46, 0.3);
}

.btn-info {
    background: var(--pico-secondary);
    color: white;
}

.btn-info:hover {
    background: var(--pico-secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(65, 64, 66, 0.3);
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* Switch container - using Pico fieldset */
.switch-container {
    margin-bottom: 1.5rem;
}

.switch-container fieldset {
    background: var(--pico-card-sectioning-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: 1rem;
    margin: 0;
}

.switch-container fieldset label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    cursor: pointer;
    font-size: 0.95rem;
}

.switch-container fieldset label input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}

.switch-container fieldset small {
    display: block;
    margin-top: 0.5rem;
    margin-left: 0;
    color: var(--pico-muted-color);
    font-size: 0.8rem;
}

/* Code output */
.code-output {
    border-radius: var(--pico-border-radius);
    overflow: hidden;
    box-shadow: var(--pico-box-shadow);
    min-height: 200px;
    position: relative;
}

.code-output:empty::before {
    content: "Generated code will appear here...";
    color: var(--pico-muted-color);
    font-style: italic;
    display: block;
    padding: 2rem;
    text-align: center;
    background: var(--pico-card-sectioning-background-color);
}

.code-output pre {
    margin: 0 !important;
    padding: 1.5rem !important;
    overflow-x: auto;
    background: #2d3748 !important;
    font-family: var(--pico-font-family-monospace) !important;
    font-size: 0.7rem !important;
    line-height: 1.4 !important;
}

.code-output pre code {
    font-size: 0.7rem !important;
    font-family: var(--pico-font-family-monospace) !important;
}

/* Error and info messages */
.error-message {
    background: rgba(204, 6, 51, 0.1);
    color: var(--pico-form-element-invalid-focus-color);
    padding: 1rem;
    border-radius: var(--pico-border-radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--pico-form-element-invalid-border-color);
    display: none;
}

.info-box {
    background: rgba(166, 25, 46, 0.05);
    border-left: 4px solid var(--pico-primary);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--pico-border-radius);
}

.info-box h3 {
    margin-top: 0;
    color: var(--pico-primary);
    font-size: 1.1rem;
}

/* Success notification */
.copy-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #00c851;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: var(--pico-border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
    z-index: 1000;
    font-weight: 600;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
    color: var(--pico-primary);
    cursor: help;
    margin-left: 0.25rem;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: auto;
    min-width: 150px;
    max-width: 250px;
    background-color: var(--pico-secondary);
    color: white;
    text-align: center;
    border-radius: var(--pico-border-radius);
    padding: 0.5rem 0.75rem;
    position: fixed;
    z-index: 99999;
    opacity: 0;
    transition: opacity var(--pico-transition);
    font-size: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    white-space: nowrap;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #a6192e 0%, #cc0633 100%);
    padding: 1.5rem;
    text-align: center;
    border-radius: 0 0 var(--pico-border-radius) var(--pico-border-radius);
}

.footer p {
    margin: 0;
    color: white;
}

.footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: opacity var(--pico-transition);
}

.footer a:hover {
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .content {
        padding: 1.5rem;
    }

    .table-wrapper {
        margin: 0 -1.5rem;
        padding: 0 1.5rem;
    }

    .options-table {
        font-size: 0.875rem;
    }

    .options-table th,
    .options-table td {
        padding: 0.5rem 0.375rem;
    }

    .btn {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
    }

    .action-buttons {
        justify-content: center;
    }

    .switch-container fieldset label {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1.5rem;
    }

    .content {
        padding: 1rem;
    }

    .section {
        margin-bottom: 1.5rem;
    }
}