/* Wrapper */
.njx-title-generator {
    border: 1px solid #ddd;
    padding: 1.5rem;
    margin: 1rem 0;
    background: #fafafa;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 1000px;
}

.njx-heading {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Controls */
.njx-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.njx-field {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.njx-field label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.njx-field input,
.njx-field select {
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
}

/* Forms */
.njx-form-type {
    display: none;
    margin-bottom: 1rem;
}

.njx-form-type.active {
    display: block;
}

.njx-row-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.njx-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid #eee;
}

/* Buttons */
.njx-actions {
    margin: 1rem 0;
    display: flex;
    gap: 0.5rem;
}

.njx-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 3px;
    border: 1px solid #555;
    background: #f5f5f5;
    cursor: pointer;
}

.njx-btn:hover {
    background: #e0e0e0;
}

.njx-btn-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.njx-btn-primary:hover {
    background: #005f8a;
}

/* Preview */
.njx-preview-heading {
    margin-top: 1.5rem;
    margin-bottom: 0.25rem;
}

.njx-preview-note {
    font-size: 0.85rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

#njx-preview-wrapper {
    border: 1px solid #ddd;
    padding: 0.5rem;
    background: #fff;
    overflow: auto;
}

.njx-preview-sheet {
    background: #fdfdfd;
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Base card styles */
.njx-card {
    box-sizing: border-box;
    border: 1px solid #444;
    background: #fefefe;
    padding: 0.2rem 0.3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Approximate physical proportions */
/* 45 strip: small & wide */
.njx-card-45 {
    width: 260px;   /* ~2.88" at 90px/inch preview-ish */
    height: 60px;   /* ~0.66" */
}

/* 78: larger card */
.njx-card-78 {
    width: 260px;
    height: 90px;
}

/* CD: taller card */
.njx-card-cd {
    width: 260px;
    min-height: 130px;
}

/* Text layout */
.njx-line {
    line-height: 1.2;
    white-space: nowrap;      /* keep everything on one line */
    overflow: visible;        /* let it spill a bit if needed */
    text-overflow: clip;      /* don’t add ellipsis */
}

.njx-line-small {
    font-size: 0.75rem;
}

.njx-line-main {
    font-size: 0.85rem;
    font-weight: 600;
}

/* 45 A/B layout */
.njx-ab-label {
    font-size: 0.6rem;
    font-weight: 700;
    margin-right: 0.25rem;
}

/* Fonts */
.font-classic {
    font-family: "Georgia", "Times New Roman", serif;
}

.font-sans {
    font-family: "Helvetica Neue", Arial, sans-serif;
}

.font-deco {
    font-family: "Trebuchet MS", "Gill Sans", system-ui;
    letter-spacing: 0.03em;
}

/* Design variants */
.design-a.njx-card {
    background: #fffef7;
    border-color: #333;
}
/* REMOVE or comment this for now:

.design-a.njx-card::before,
.design-a.njx-card::after {
    content: "";
    display: block;
    height: 1px;
    background: #333;
}

*/

.design-b.njx-card {
    background: #f8fbff;
    border-color: #005f8a;
}

.design-b .njx-line-main {
    text-transform: uppercase;
}

.design-c.njx-card {
    background: #fdf8ff;
    border-style: double;
    border-width: 2px;
}

/* CD track list */
.njx-cd-title {
    font-size: 0.8rem;
    font-weight: 700;
}

.njx-cd-artist {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.njx-cd-track {
    font-size: 0.7rem;
    line-height: 1.25;
}
/* Force Update Preview to look active, override Kadence/WP styles */
#njx-title-generator #njx-refresh-preview.njx-btn {
    background: #f5f5f5 !important;
    border: 1px solid #555 !important;
    color: #000 !important;
    opacity: 1 !important;
    cursor: pointer !important;
}

#njx-title-generator #njx-refresh-preview.njx-btn:hover {
    background: #e0e0e0 !important;
}