/* CSS Custom Properties for consistency */
:root {
    --card-bg: #F9F9F9;
    --section-bg: white;
    --text-primary: #333;
    --text-secondary: #555;
    --text-tertiary: #666;
    --border-radius-sm: 4px;
    --border-radius-md: 6px;
    --border-radius-lg: 8px;
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 3px 8px rgba(0, 0, 0, 0.15);
}

body {
    font-family: var(--font-family), sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0.1rem;
}

/* Main card with all nested elements */
.card {
    border-radius: var(--border-radius-md);
    box-shadow: 2px 4px 8px 0 #00000020;
    padding: 0.3rem;
    background-color: var(--card-bg);
    max-width: 1200px;
    margin: 0 auto;

    /* All typography inherits from card */
    h1 {
        color: var(--text-primary);
        font-weight: 300;
        margin: 0 0 0.15rem 0;
        font-size: 1.2rem;
        line-height: 1.1;
        text-align: center;
    }

    h3 {
        margin: 0 0 0.2rem 0;
        color: var(--text-secondary);
        font-size: 0.85rem;
        font-weight: 500;
    }

    h4 {
        margin: 0.15rem 0 0.1rem 0;
        color: var(--text-tertiary);
        font-size: 0.8rem;
        font-weight: 500;
    }
}

/* Form and command sections with all nested elements */
.form-section, .command-section {
    background-color: var(--section-bg);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
    padding: 0.3rem;
    margin-bottom: 0.2rem;
}

.form-section {
    /* Form field spacing optimizations */
    .field, .formgrid .field {
        margin-bottom: 0.3rem;
    }

    .field-checkbox, .formgrid .field-checkbox {
        margin-bottom: 0.25rem;
    }
}

.command-section {
    margin-bottom: 0.4rem;

    #curlContent, #mavenContent {
        background-color: #f8f9fa;
        border: 1px solid #dee2e6;
        border-radius: var(--border-radius-sm);
        padding: 0.4rem;
        margin: 0.2rem 0;
        font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
        font-size: 0.7rem;
        overflow-x: auto;
        max-height: 80px;
        width: 100%;
        box-sizing: border-box;
        white-space: nowrap;
        line-height: 1.2;
        display: block;
    }

    /* Copy button styling - consolidated for all screen sizes */
    .copy-area {
        margin-top: 0.4rem;

        button {
            padding: 0.4rem 0.8rem !important;
            font-size: 0.85rem !important;
            min-height: 2rem;
            border-radius: var(--border-radius-sm);
            margin-right: 0.5rem;

            @media (min-width: 768px) {
                padding: 0.5rem 1rem !important;
                font-size: 0.95rem !important;
                min-height: 2.25rem;
            }
        }

        .copy-feedback {
            color: #28a745;
            font-weight: bold;
            font-size: 0.85rem;
            margin-left: 0.3rem;

            @media (min-width: 768px) {
                font-size: 0.95rem;
            }
        }
    }
}

/* Special button styling */
.download-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white !important;
    font-weight: bold;
    padding: 0.25rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: transform 0.2s ease-in-out;
    font-size: 0.85rem !important;

    &:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }
}

/* Responsive design - consolidated all adjustments */
@media (min-width: 768px) {
    body {
        padding: 0.3rem;
    }

    .card {
        border-radius: var(--border-radius-lg);
        box-shadow: 3px 6px 12px 0 #00000025;
        padding: 0.5rem 0.75rem;

        h1 {
            margin-bottom: 0.4rem;
            font-size: 1.5rem;
        }

        h3 {
            margin-bottom: 0.3rem;
            font-size: 0.9rem;
        }
    }

    .form-section, .command-section {
        border-radius: var(--border-radius-md);
        box-shadow: var(--shadow-lg);
        padding: 0.5rem;
        margin-bottom: 0.3rem;
    }

    .form-section {
        .field, .formgrid .field {
            margin-bottom: 0.4rem;
        }

        .field-checkbox, .formgrid .field-checkbox {
            margin-bottom: 0.35rem;
        }
    }

    .command-section {
        #curlContent, #mavenContent {
            padding: 0.5rem;
            margin: 0.2rem 0;
            font-size: 0.75rem;
            max-height: 100px;
        }
    }
}

@media (min-width: 1200px) {
    .card {
        padding: 0.75rem 1rem;
        box-shadow: 4px 8px 16px 0 #00000030;
    }
}
