/* Entry launcher (no catalog chrome until campaign is chosen and routed) */

body.launcher-body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f3f4f8;
    color: #1a1a1a;
    line-height: 1.55;
    min-height: 100vh;
}

.launcher-root {
    max-width: 920px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.launcher-hero h1 {
    font-size: 28px;
    font-weight: 650;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.launcher-hero p.sub {
    color: #5f6368;
    font-size: 16px;
    margin-bottom: 28px;
}

.launcher-card {
    background: #fff;
    border-radius: 14px;
    padding: 28px 28px 24px;
    box-shadow: 0 2px 16px rgba(17, 24, 39, 0.07);
    margin-bottom: 22px;
}

.launcher-card h2 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
    color: #374151;
}

.launcher-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: flex-end;
    margin-bottom: 18px;
}

.launcher-field {
    flex: 1;
    min-width: 200px;
}

.launcher-field-stretch {
    flex: 1;
    min-width: 0;
}

.launcher-row-campaign-line {
    margin-bottom: 0;
}

.launcher-row-campaign-line .launcher-field {
    flex: 1 1 100%;
    min-width: 100%;
}

.launcher-select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}

.launcher-row-compact-split {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 16px;
    align-items: end;
    margin-bottom: 18px;
}

.launcher-field-offers {
    min-width: 0;
}

.launcher-input-offers {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 560px) {
    .launcher-row-compact-split {
        grid-template-columns: 1fr;
    }
}

.launcher-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #444;
}

.launcher-field input[type="text"],
.launcher-field input[type="number"],
.launcher-select-wrap {
    width: 100%;
}

.launcher-field input[type="text"],
.launcher-field input[type="number"] {
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
}

.launcher-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
}

.launcher-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    background: #4285f4;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.launcher-primary:hover:not(:disabled) {
    background: #3367d6;
}

.launcher-primary:disabled {
    opacity: 0.56;
    cursor: not-allowed;
}

.launcher-secondary {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: #4285f4;
    cursor: pointer;
}

.launcher-secondary:hover {
    text-decoration: underline;
}

.launcher-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    background: #fff;
    color: #3c4043;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.launcher-outline:hover:not(:disabled) {
    border-color: #4285f4;
    color: #1967d2;
}

.offer-panel-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.launcher-note {
    font-size: 13px;
    color: #5f6368;
    margin-top: 12px;
}

.launcher-catalog-actions {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e8eaed;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.launcher-catalog-actions-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    width: 100%;
}

@media (min-width: 480px) {
    .launcher-catalog-actions-label {
        width: auto;
    }
}

button.launcher-catalog-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.launcher-foot .muted.mx {
    margin: 0 6px;
    color: #9aa0a6;
}

.launcher-foot a + a {
    margin-left: 4px;
}

.launcher-foot {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #dadce0;
}

.launcher-foot a {
    color: #4285f4;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.launcher-foot a:hover {
    text-decoration: underline;
}

.launcher-foot span.muted {
    color: #70757a;
    font-size: 13px;
}

/* Offer panel */
.launcher-offer-panel {
    margin-top: 8px;
}

.launcher-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.launcher-meta dt {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #70757a;
    margin-bottom: 4px;
}

.launcher-meta dd {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    word-break: break-all;
}

.offer-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.offer-card {
    border: 1px solid #e8eaed;
    border-radius: 10px;
    padding: 14px 16px;
    background: #fafbfc;
}

.offer-card .rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #4285f4;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin-right: 12px;
}

.offer-card-head {
    display: flex;
    align-items: flex-start;
}

.offer-card-title {
    font-weight: 600;
    font-size: 15px;
}

.offer-card-meta {
    margin-top: 8px;
    font-size: 13px;
    color: #45474d;
    display: grid;
    gap: 4px;
}

.launcher-raw {
    margin-top: 20px;
}

.launcher-raw summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    color: #4285f4;
    user-select: none;
}

.launcher-raw pre {
    margin-top: 10px;
    padding: 14px;
    background: #282c34;
    color: #e8eaed;
    border-radius: 8px;
    font-size: 12px;
    overflow: auto;
    max-height: 420px;
}

.launcher-error {
    background: #fce8e6;
    color: #c5221f;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 12px;
}

.launcher-spinner {
    display: inline-block;
    animation: launcher-spin 0.9s linear infinite;
}

@keyframes launcher-spin {
    to { transform: rotate(360deg); }
}

.launcher-hero-link {
    font-size: 14px;
    margin-top: 8px;
}

.launcher-hero-link a {
    color: #4285f4;
    font-weight: 600;
    text-decoration: none;
}

.launcher-hero-link a:hover {
    text-decoration: underline;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.use-case-card {
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 16px 16px 14px;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.use-case-card:hover {
    border-color: #4285f4;
    box-shadow: 0 4px 14px rgba(66, 133, 244, 0.12);
}

.use-case-card:focus {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}

.use-case-card h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
    color: #202124;
}

.use-case-card p {
    margin: 0;
    font-size: 13px;
    color: #5f6368;
    line-height: 1.45;
    flex: 1;
}

.use-case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.use-case-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #1967d2;
    background: #e8f0fe;
    padding: 3px 8px;
    border-radius: 999px;
}

.workspace-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.workspace-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
    resize: vertical;
    min-height: 72px;
}

.workspace-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.launcher-file-label input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.launcher-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer;
}
