/*Icon base (container) */
.nik-icon{
    --size: 44px;
    --accent: #782f40;
    width: var(--size);
    height: var(--size);
    border: 0;
    /* border: 2px solid var(--accent); */
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
    /* box-shadow: 0 1px 2px rgba(0,0,0,.04); */
    box-shadow: none;
}

.nik-icon::before,
.nik-icon::after{
    content:"";
    position:absolute;
    display:block;
}

.nik-img-icon{
    width: var(--icon-size, 44px);
    height: var(--icon-size, 44px);
    display: block;
    object-fit: contain;
}

/* Envelope */
.nik-icon--mail::before{
    width: 22px; height: 14px;
    border: 2px solid var(--accent);
    border-radius: 2px;
    top: 50%; left: 50%;
    transform: translate(-50%, -56%);
    background:
            linear-gradient(135deg, transparent calc(50% - 1px),
            var(--accent) 0,
            var(--accent) calc(50% + 1px),
            transparent 0),

            linear-gradient(225deg, transparent calc(50% - 1px),
            var(--accent) 0,
            var(--accent) calc(50% + 1px),
            transparent 0);
}

/* Desktop */
.nik-icon--monitor::before{
    width: 24px;
    height: 16px;
    border: 2px solid var(--accent);
    border-radius: 2px;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
}

.nik-icon--monitor::after{
    width: 12px;
    height: 3px;
    background: var(--accent);
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Phone icon */
.nik-icon--phone::before{
    width: 16px;
    height: 24px;
    border: 2px solid var(--accent);
    border-radius: 4px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%);
    background: #fff;
}

.nik-icon--phone::after{
    width: 3px;
    height: 3px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    bottom: 9px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
}

/* Management */
.nik-icon--cloud::before{
    width: 24px;
    height: 12px;
    background: #fff;
    border: 2px solid var(--accent);
    border-bottom-width: 2px;
    border-radius: 10px/7px;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow:
            -10px -4px 0 0 #fff,
            10px -4px 0 0 #fff;
}

.nik-icon--cloud::after{
    width: 10px;
    height: 10px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    top: 16px;
    left: calc(50% - 12px);
    box-shadow: 24px 0 0 0 #fff, 24px 0 0 0 var(--accent);
    background: #fff;
}

/* Analytics / BI Bar Chart */
.nik-icon--chart::before {
    content: "";
    position: absolute;
    /* Draw the X and Y axes */
    width: 24px;
    height: 22px;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    left: 10px;
    bottom: 10px;
    border-bottom-left-radius: 2px;
    box-sizing: border-box;
}

.nik-icon--chart::after {
    content: "";
    position: absolute;
    /* Container for the bars */
    width: 18px;
    height: 18px;
    left: 14px;
    /* Sits directly on top of the 2px bottom axis */
    bottom: 12px;
    /* Draw 3 bars of increasing height (6px, 12px, 18px) spaced 3px apart */
    background:
            linear-gradient(var(--accent), var(--accent)) 0 bottom / 4px 6px no-repeat,
            linear-gradient(var(--accent), var(--accent)) 7px bottom / 4px 12px no-repeat,
            linear-gradient(var(--accent), var(--accent)) 14px bottom / 4px 18px no-repeat;
}

/* ===== Database (stacked cylinders) ===== */
.nik-icon--db::before{
    width: 26px;
    height: 18px;
    top: 38%;
    left: 50%;
    transform: translate(-50%, -50%);
    background:
            radial-gradient(ellipse 13px 6px at 50% 2px, #fff 8px, transparent 9px) top/100% 50% no-repeat,
            linear-gradient(#fff 0 0) bottom/100% calc(100% - 6px) no-repeat;
    border: 2px solid var(--accent);
    border-top: 0;
    border-radius: 0 0 6px 6px;
}

.nik-icon--db::after{
    width: 26px;
    height: 12px;
    left: 50%;
    top: 56%;
    transform: translateX(-50%);
    background:
            radial-gradient(ellipse 13px 5px at 50% 2px, #fff 8px, transparent 9px) top/100% 50% no-repeat,
            linear-gradient(#fff 0 0) bottom/100% calc(100% - 6px) no-repeat;
    border: 2px solid var(--accent);
    border-top: 0;
    border-radius: 0 0 6px 6px;
}

/* ===== Windows-style application window ===== */
.nik-icon--window::before{
    /* window body */
    width: 26px;
    height: 20px;
    border: 2px solid var(--accent);
    border-radius: 3px;
    background:
        /* controls (X, square, _), drawn in the title bar */
            linear-gradient(135deg,#fff 0 1px,transparent 0) 6px 2px/5px 5px no-repeat,   /* X diag 1 */
            linear-gradient(45deg ,#fff 0 1px,transparent 0) 6px 2px/5px 5px no-repeat,   /* X diag 2 */
            linear-gradient(#fff 0 0)                  12px 2px/5px 5px no-repeat,        /* square */
            linear-gradient(#fff 0 0)                  18px 4px/5px 1.5px no-repeat,      /* minimize */
                /* a couple of faint content lines */
            linear-gradient(#eadde0 0 0)               4px 11px/18px 1px no-repeat,
            linear-gradient(#eadde0 0 0)               4px 14px/16px 1px no-repeat,
                /* title bar fill */
            linear-gradient(to bottom, var(--accent) 0 6px, transparent 6px),
                /* window fill */
             linear-gradient(#fff 0 0);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -52%);
    position: absolute;
    content: "";
}

/* --- Override: make the cloud a solid burgundy silhouette --- */
.nik-icon--cloud-alt::before{
    /* same size/position as before */
    width: 34px;
    height: 22px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -52%);
    position: absolute;
    content: "";

    /* fill every puff + base with var(--accent) */
    border-radius: 12px;
    background:
            radial-gradient(circle 8px  at 28% 60%, var(--accent) 99%, transparent 100%),
            radial-gradient(circle 10px at 52% 48%, var(--accent) 99%, transparent 100%),
            radial-gradient(circle 8px  at 75% 58%, var(--accent) 99%, transparent 100%),
            linear-gradient(var(--accent) 0 0) bottom / 100% 10px no-repeat;

    /* no outline trick needed for a solid shape */
    filter: none;
}

/* remove the glossy highlight so it stays fully solid */
.nik-icon--cloud-alt::after{
    content: none;
}
/* ===== Refresh / Cycle (two arcs with arrowheads at the ends) =====
   Usage: <span class="nik-icon nik-icon--refresh" aria-hidden="true"></span>
   - Respects --size and --accent from .nik-icon
*/
.nik-icon--refresh{
    /* stroke + radius used for precise placement */
    --stroke: calc(var(--size) * 0.11);                       /* ring thickness */
    --r: calc((var(--size) / 2) - (var(--stroke) / 2));        /* ring centerline radius */

    /* draw the two arcs via a conic gradient */
    background:
            conic-gradient(
                    var(--accent) 50deg 165deg,    /* upper-left arc */
                    transparent 0 230deg,
                    var(--accent) 230deg 345deg,   /* lower-right arc */
                    transparent 0
            );

    border-radius: 50%;

    /* cut the center out so it looks like a stroked ring */
    -webkit-mask: radial-gradient(circle closest-side,
    transparent calc(100% - var(--stroke)),
    #000 0);
    mask: radial-gradient(circle closest-side,
    transparent calc(100% - var(--stroke)),
    #000 0);

    /* this icon has no inner fill/shadow */
    box-shadow: none;
    position: relative;
}

/* Arrowheads (filled triangles sized to match the stroke) */
.nik-icon--refresh::before,
.nik-icon--refresh::after{
    --head: calc(var(--stroke) * 2.05); /* arrowhead size */
    content:"";
    position:absolute;
    left:50%;
    top:50%;
    width: var(--head);
    height: var(--head);
    background: var(--accent);
    -webkit-clip-path: polygon(0 50%, 100% 0, 100% 100%);      /* right-pointing triangle */
    clip-path: polygon(0 50%, 100% 0, 100% 100%);
    transform-origin: 50% 50%;
}

/* Up-left arrow at the end of the upper arc (165°), tangent points up/left */
.nik-icon--refresh::before{
    transform:
            translate(-50%, -50%)
            rotate(165deg)                   /* aim radial to 165° */
            translate(var(--r))              /* move to ring centerline */
            rotate(-90deg)                   /* align with tangent (counter-clockwise) */
                /* final nudge: along tangent (left) and slightly outward (up) */
            translate(
                    calc(var(--stroke) * -0.70),
                    calc(var(--stroke) * -0.40)
            );
}

/* Down-right arrow at the end of the lower arc (345°), tangent points down/right */
.nik-icon--refresh::after{
    transform:
            translate(-50%, -50%)
            rotate(345deg)                   /* aim radial to 345° */
            translate(var(--r))              /* move to ring centerline */
            rotate(90deg)                    /* align with tangent (clockwise) */
                /* final nudge: along tangent (right) and slightly outward (down) */
            translate(
                    calc(var(--stroke) * 0.70),
                    calc(var(--stroke) * 0.40)
            );
}



/* ===== Brain (circuit style) =========================================================================================================
   Usage: <span class="nik-icon nik-icon--brain" aria-hidden="true"></span>
   - Respects .nik-icon --size and --accent
   - ::before draws the silhouette with an outline
   - ::after draws a few internal "circuit" traces + nodes
*/
.nik-icon--brain{
    background: transparent;      /* let our layers do the drawing */
    box-shadow: none;
    position: relative;
}

/* Brain silhouette: compose white lobes + stem and outline them */
.nik-icon--brain::before{
    content:"";
    position:absolute;
    left:50%; top:50%;
    transform: translate(-50%, -52%);
    width: calc(var(--size) * 0.72);
    height: calc(var(--size) * 0.56);

    /* Build the brain shape as opaque white blobs; outline via drop-shadow */
    background:
        /* left upper lobe */  radial-gradient(circle at 32% 32%, #fff 85%, transparent 86%),
        /* right upper lobe */ radial-gradient(circle at 68% 32%, #fff 85%, transparent 86%),
        /* left lower lobe */  radial-gradient(circle at 35% 62%, #fff 88%, transparent 89%),
        /* right lower lobe */ radial-gradient(circle at 65% 62%, #fff 88%, transparent 89%),
        /* central body */     radial-gradient(60% 55% at 50% 50%, #fff 98%, transparent 99%);

    /* add a small stem at bottom center */
    box-shadow:
            0 0 0 2px var(--accent); /* fallback stroke if filter not supported */
    filter: drop-shadow(0 0 0 var(--accent)); /* crisp outline around merged shape */
    border-radius: 18px;
}

/* Internal "circuit" traces + nodes (kept inside the silhouette bounds) */
.nik-icon--brain::after{
    content:"";
    position:absolute;
    left:50%; top:50%;
    transform: translate(-50%, -54%);
    width: calc(var(--size) * 0.58);
    height: calc(var(--size) * 0.42);
    border-radius: 12px;

    /* a handful of thin lines and circular nodes */
    background:
        /* H lines */
            linear-gradient(var(--accent) 0 0) 8% 38%/84% 1.6px no-repeat,
            linear-gradient(var(--accent) 0 0) 15% 62%/70% 1.6px no-repeat,
                /* V + diag */
            linear-gradient(var(--accent) 0 0) 50% 12%/1.6px 78% no-repeat,
            linear-gradient(135deg, var(--accent) 0 0) 30% 30%/1.6px 45% no-repeat,
            linear-gradient(45deg , var(--accent) 0 0) 70% 30%/1.6px 45% no-repeat,

                /* nodes (small circles) */
            radial-gradient(circle 2px at 16% 38%, var(--accent) 99%, transparent 100%),
            radial-gradient(circle 2px at 46% 20%, var(--accent) 99%, transparent 100%),
            radial-gradient(circle 2px at 84% 38%, var(--accent) 99%, transparent 100%),
            radial-gradient(circle 2px at 30% 62%, var(--accent) 99%, transparent 100%),
            radial-gradient(circle 2px at 70% 62%, var(--accent) 99%, transparent 100%);
    opacity: .95;
}


/* Tint the blue brain artwork while keeping its neutral background. */
.nik-img-icon--burgundy {
    filter: url('/icon-tint.svg#burgundy');
}
