/* Advanced Barcode Generator - Core Styling Stylesheet */
.abg-wrapper *, .abg-wrapper *::before, .abg-wrapper *::after {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.abg-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    background-color: #f4f5f7;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Header Bar Styling */
.abg-header {
    background-color: #00e5ff;
    padding: 16px 20px;
    text-align: center;
}

.abg-header h2 {
    margin: 0 !important;
    padding: 0 !important;
    color: #1a1a1a !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Main Layout Grid */
.abg-container {
    display: block;
    padding: 20px;
}

.abg-panel {
    background: #ffffff;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e3e8ee;
}

.abg-panel:last-child {
    margin-bottom: 0;
}

/* Control Elements */
.abg-field-group {
    margin-bottom: 15px;
}

.abg-field-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 6px;
}

.abg-field-group select,
.abg-field-group input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 14px;
    color: #1a1a1a;
    background-color: #ffffff;
    transition: border-color 0.2s;
}

.abg-field-group select:focus,
.abg-field-group input[type="text"]:focus {
    border-color: #00e5ff;
    outline: none;
}

/* Range Inputs & Multi-columns */
.abg-row {
    display: table;
    width: 100%;
    table-layout: fixed;
    margin-bottom: 10px;
}

.abg-col {
    display: table-cell;
    padding-right: 10px;
    vertical-align: top;
}

.abg-col:last-child {
    padding-right: 0;
}

.abg-field-group input[type="range"] {
    width: 100%;
    margin-top: 5px;
}

.abg-field-group input[type="color"] {
    display: block;
    width: 100%;
    height: 38px;
    padding: 2px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
}

.abg-row-checkbox {
    margin: 15px 0 20px 0;
}

.abg-row-checkbox input[type="checkbox"] {
    margin-right: 8px;
    vertical-align: middle;
}

.abg-row-checkbox label {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    vertical-align: middle;
    cursor: pointer;
}

/* Error Typography */
.abg-error-msg {
    color: #ff3333;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
    display: none;
}

/* Button UI Definitions */
.abg-action-buttons {
    margin-top: 10px;
}

.abg-btn {
    display: block;
    width: 100%;
    background-color: #00e5ff !important;
    color: #1a1a1a !important;
    border: none !important;
    padding: 12px 20px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.2s, opacity 0.2s !important;
    text-align: center;
    margin-bottom: 10px;
}

.abg-btn:hover {
    background-color: #33d6ff !important;
    opacity: 0.95;
}

.abg-btn-secondary {
    background-color: #e3e8ee !important;
    color: #4f5b66 !important;
}

.abg-btn-secondary:hover {
    background-color: #ccd4dc !important;
}

/* Preview Area */
.abg-preview-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 15px;
    text-align: center;
}

.abg-canvas-container {
    width: 100%;
    background: #fdfdfd;
    border: 1px dashed #cccccc;
    padding: 20px;
    min-height: 200px;
    display: table;
}

.abg-canvas-container canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto !important;
}

.abg-error-fallback {
    display: none;
    text-align: center;
    color: #ff3333;
    font-size: 14px;
    font-weight: 500;
    padding: 40px 0;
}

/* Layout Adjustments for Desktop screens */
@media screen and (min-width: 768px) {
    .abg-container {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    .abg-panel {
        display: table-cell;
        width: 50%;
        vertical-align: top;
        margin-bottom: 0;
    }
    .abg-controls {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
    .abg-preview {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        border-left: none;
    }
}
