/* Cytracon Label CSS shapes — loaded separately so existing theme LESS stays untouched. */

.amlabel-css-shape {
    --amlabel-shape-color: #c41e3a;
    --amlabel-shape-ratio: 2 / 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: var(--amlabel-shape-ratio);
    overflow: visible;
    box-sizing: border-box;
}

.amlabel-css-shape .amlabel-css-shape-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: var(--amlabel-shape-color);
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.18);
}

.amlabel-css-shape .amlabel-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    box-sizing: border-box;
    padding: 0 10%;
    line-height: 1.15 !important;
}

.amlabel-css-shape--pill {
    --amlabel-shape-ratio: 2.6 / 1;
}
.amlabel-css-shape--pill .amlabel-css-shape-bg {
    border-radius: 999px;
}

.amlabel-css-shape--circle {
    --amlabel-shape-ratio: 1 / 1;
}
.amlabel-css-shape--circle .amlabel-css-shape-bg {
    border-radius: 50%;
}

.amlabel-css-shape--rounded {
    --amlabel-shape-ratio: 1 / 1;
}
.amlabel-css-shape--rounded .amlabel-css-shape-bg {
    border-radius: 22%;
}

.amlabel-css-shape--rectangle {
    --amlabel-shape-ratio: 2.2 / 1;
}
.amlabel-css-shape--rectangle .amlabel-css-shape-bg {
    border-radius: 8px;
}

.amlabel-css-shape--ribbon {
    --amlabel-shape-ratio: 0.78 / 1;
}
.amlabel-css-shape--ribbon .amlabel-css-shape-bg {
    clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
    box-shadow: none;
}
.amlabel-css-shape--ribbon .amlabel-text {
    padding: 8% 12% 22%;
}

.amlabel-css-shape--flag {
    --amlabel-shape-ratio: 2.3 / 1;
}
.amlabel-css-shape--flag .amlabel-css-shape-bg {
    clip-path: polygon(0 0, 100% 0, 84% 50%, 100% 100%, 0 100%);
    box-shadow: none;
}
.amlabel-css-shape--flag .amlabel-text {
    padding-right: 18%;
}

.amlabel-css-shape--burst {
    --amlabel-shape-ratio: 1 / 1;
}
.amlabel-css-shape--burst .amlabel-css-shape-bg {
    clip-path: polygon(50.00% 0.00%, 58.80% 17.16%, 75.00% 6.70%, 74.04% 25.96%, 93.30% 25.00%, 82.84% 41.20%, 100.00% 50.00%, 82.84% 58.80%, 93.30% 75.00%, 74.04% 74.04%, 75.00% 93.30%, 58.80% 82.84%, 50.00% 100.00%, 41.20% 82.84%, 25.00% 93.30%, 25.96% 74.04%, 6.70% 75.00%, 17.16% 58.80%, 0.00% 50.00%, 17.16% 41.20%, 6.70% 25.00%, 25.96% 25.96%, 25.00% 6.70%, 41.20% 17.16%);
    box-shadow: none;
}
.amlabel-css-shape--burst .amlabel-text {
    padding: 18%;
}

.amlabel-css-shape--seal {
    --amlabel-shape-ratio: 1 / 1;
}
.amlabel-css-shape--seal .amlabel-css-shape-bg {
    clip-path: polygon(50.00% 0.00%, 57.61% 11.75%, 69.13% 3.81%, 71.67% 17.57%, 85.36% 14.64%, 82.43% 28.33%, 96.19% 30.87%, 88.25% 42.39%, 100.00% 50.00%, 88.25% 57.61%, 96.19% 69.13%, 82.43% 71.67%, 85.36% 85.36%, 71.67% 82.43%, 69.13% 96.19%, 57.61% 88.25%, 50.00% 100.00%, 42.39% 88.25%, 30.87% 96.19%, 28.33% 82.43%, 14.64% 85.36%, 17.57% 71.67%, 3.81% 69.13%, 11.75% 57.61%, 0.00% 50.00%, 11.75% 42.39%, 3.81% 30.87%, 17.57% 28.33%, 14.64% 14.64%, 28.33% 17.57%, 30.87% 3.81%, 42.39% 11.75%);
    box-shadow: none;
}
.amlabel-css-shape--seal .amlabel-text {
    padding: 20%;
}

.amlabel-css-shape--hexagon {
    --amlabel-shape-ratio: 1.05 / 1;
}
.amlabel-css-shape--hexagon .amlabel-css-shape-bg {
    clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
    box-shadow: none;
}

.amlabel-css-shape--diamond {
    --amlabel-shape-ratio: 1 / 1;
}
.amlabel-css-shape--diamond .amlabel-css-shape-bg {
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    box-shadow: none;
}
.amlabel-css-shape--diamond .amlabel-text {
    padding: 22%;
}

.amlabel-css-shape--tag {
    --amlabel-shape-ratio: 2.4 / 1;
}
.amlabel-css-shape--tag .amlabel-css-shape-bg {
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 20% 100%, 0 50%);
    -webkit-mask: radial-gradient(circle at 18% 50%, transparent 7%, #000 7.5%);
    mask: radial-gradient(circle at 18% 50%, transparent 7%, #000 7.5%);
    box-shadow: none;
}
.amlabel-css-shape--tag .amlabel-text {
    padding-left: 18%;
}

.amlabel-css-shape--banner {
    --amlabel-shape-ratio: 3 / 1;
}
.amlabel-css-shape--banner .amlabel-css-shape-bg {
    clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
    box-shadow: none;
}

.amlabel-css-shape--shield {
    --amlabel-shape-ratio: 0.9 / 1;
}
.amlabel-css-shape--shield .amlabel-css-shape-bg {
    clip-path: polygon(50% 0, 100% 12%, 100% 58%, 50% 100%, 0 58%, 0 12%);
    box-shadow: none;
}
.amlabel-css-shape--shield .amlabel-text {
    padding: 18% 14% 24%;
}

.amlabel-css-shape--ticket {
    --amlabel-shape-ratio: 2.6 / 1;
}
.amlabel-css-shape--ticket .amlabel-css-shape-bg {
    border-radius: 6px;
    -webkit-mask:
        radial-gradient(circle at 0 50%, transparent 9px, #000 9.5px),
        radial-gradient(circle at 100% 50%, transparent 9px, #000 9.5px);
    -webkit-mask-composite: source-in;
    mask:
        radial-gradient(circle at 0 50%, transparent 9px, #000 9.5px),
        radial-gradient(circle at 100% 50%, transparent 9px, #000 9.5px);
    mask-composite: intersect;
}

.amlabel-css-shape--sash {
    --amlabel-shape-ratio: 2.8 / 1;
}
.amlabel-css-shape--sash .amlabel-css-shape-bg {
    transform: skewX(-16deg);
    border-radius: 4px;
}

.amlabel-css-shape--chevron {
    --amlabel-shape-ratio: 2.4 / 1;
}
.amlabel-css-shape--chevron .amlabel-css-shape-bg {
    clip-path: polygon(0 0, 78% 0, 100% 50%, 78% 100%, 0 100%, 16% 50%);
    box-shadow: none;
}
.amlabel-css-shape--chevron .amlabel-text {
    padding-right: 16%;
    padding-left: 14%;
}

.amlabel-css-shape--outline_pill,
.amlabel-css-shape--outline_circle {
    --amlabel-shape-ratio: 2.6 / 1;
}
.amlabel-css-shape--outline_circle {
    --amlabel-shape-ratio: 1 / 1;
}
.amlabel-css-shape--outline_pill .amlabel-css-shape-bg,
.amlabel-css-shape--outline_circle .amlabel-css-shape-bg {
    background: rgba(255, 255, 255, 0.88);
    border: 3px solid var(--amlabel-shape-color);
    box-shadow: 0 1px 4px rgba(17, 24, 39, 0.12);
}
.amlabel-css-shape--outline_pill .amlabel-css-shape-bg {
    border-radius: 999px;
}
.amlabel-css-shape--outline_circle .amlabel-css-shape-bg {
    border-radius: 50%;
}

/* Admin shape chooser */
.amlabel-shapes-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.amlabel-shapes-container > .amlabel-shape {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 104px;
    min-height: 92px;
    height: auto;
    margin: 0;
    padding: 10px 8px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    box-sizing: border-box;
}

.amlabel-shapes-container > .amlabel-shape:hover {
    border-color: #9ca3af;
}

.amlabel-shapes-container > .amlabel-shape.-am-checked {
    border-color: #111827;
    box-shadow: 0 0 0 1px #111827;
    background: #fff;
}

.amlabel-shapes-container .amlabel-shape-preview {
    width: 78px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amlabel-shapes-container .amlabel-shape-preview.amlabel-css-shape {
    width: 78px;
    height: 42px;
    aspect-ratio: auto;
}

.amlabel-shapes-container .amlabel-shape-preview .amlabel-css-shape-bg {
    box-shadow: none;
}

.amlabel-shapes-container .amlabel-shape-name {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.25;
    text-align: center;
    color: #374151;
}

.amlabel-image-preview .cytracon-label-container.amlabel-css-shape {
    min-width: 72px;
}
