/**
 * Insight Dezign Shortcodes — Frontend Styles
 */

/* ══════════════════════════════════════
   Alert
   ══════════════════════════════════════ */
.idsc-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.6;
    position: relative;
}
.idsc-alert--info    { background: #eff6ff; border-left: 4px solid #3b82f6; color: #1e40af; }
.idsc-alert--success { background: #f0fdf4; border-left: 4px solid #22c55e; color: #166534; }
.idsc-alert--warning { background: #fffbeb; border-left: 4px solid #f59e0b; color: #92400e; }
.idsc-alert--error   { background: #fef2f2; border-left: 4px solid #ef4444; color: #991b1b; }

.idsc-alert__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}
.idsc-alert__body { flex: 1; }
.idsc-alert__title {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}
.idsc-alert__message p:last-child { margin-bottom: 0; }
.idsc-alert__close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.5;
    color: inherit;
}
.idsc-alert__close:hover { opacity: 1; }

/* ══════════════════════════════════════
   Testimonial
   ══════════════════════════════════════ */
.idsc-testimonial {
    margin: 0 0 20px;
    padding: 24px;
    border: none;
    font-style: normal;
    line-height: 1.7;
}
.idsc-testimonial--standard {
    border-left: 4px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 8px 8px 0;
}
.idsc-testimonial--card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
}
.idsc-testimonial--centered {
    text-align: center;
    background: #f9fafb;
    border-radius: 8px;
}
.idsc-testimonial__stars {
    display: flex;
    gap: 2px;
    margin-bottom: 12px;
}
.idsc-testimonial--centered .idsc-testimonial__stars { justify-content: center; }
.idsc-testimonial__star {
    width: 18px;
    height: 18px;
    fill: #d1d5db;
}
.idsc-testimonial__star.idsc-star--filled { fill: #f59e0b; }
.idsc-testimonial__content {
    font-size: 16px;
    margin-bottom: 16px;
}
.idsc-testimonial__content p:last-child { margin-bottom: 0; }
.idsc-testimonial__footer {
    display: flex;
    align-items: center;
    gap: 12px;
}
.idsc-testimonial--centered .idsc-testimonial__footer {
    flex-direction: column;
    gap: 8px;
}
.idsc-testimonial__photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.idsc-testimonial__meta { display: flex; flex-direction: column; }
.idsc-testimonial__author {
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}
.idsc-testimonial__role {
    font-size: 13px;
    color: #6b7280;
}

/* ══════════════════════════════════════
   Card
   ══════════════════════════════════════ */
.idsc-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 20px;
}
.idsc-card--img-left,
.idsc-card--img-right { display: flex; }
.idsc-card--img-right { flex-direction: row-reverse; }
.idsc-card__media { flex-shrink: 0; }
.idsc-card--img-top .idsc-card__media { width: 100%; }
.idsc-card--img-left .idsc-card__media,
.idsc-card--img-right .idsc-card__media { width: 40%; }
.idsc-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.idsc-card__body {
    padding: 24px;
    flex: 1;
}
.idsc-card__title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #111827;
}
.idsc-card__content {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 16px;
}
.idsc-card__content p:last-child { margin-bottom: 0; }
.idsc-card__button {
    display: inline-block;
    padding: 10px 20px;
    background: #3b82f6;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
}
.idsc-card__button:hover { background: #2563eb; color: #fff; }

/* ══════════════════════════════════════
   Progress Bar
   ══════════════════════════════════════ */
.idsc-progress {
    margin-bottom: 20px;
}
.idsc-progress__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}
.idsc-progress__label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}
.idsc-progress__pct {
    font-size: 13px;
    color: #6b7280;
}
.idsc-progress__track {
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.idsc-progress__bar {
    height: 100%;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.6s ease;
}
.idsc-progress__pct-inner {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
.idsc-progress--animated .idsc-progress__bar {
    background-image: linear-gradient(
        45deg,
        rgba(255,255,255,0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255,255,255,0.15) 50%,
        rgba(255,255,255,0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: idsc-progress-stripes 1s linear infinite;
}
@keyframes idsc-progress-stripes {
    from { background-position: 1rem 0; }
    to   { background-position: 0 0; }
}

/* ══════════════════════════════════════
   Icon List
   ══════════════════════════════════════ */
.idsc-icon-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}
.idsc-icon-list__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
}
.idsc-icon-list__icon {
    flex-shrink: 0;
    display: inline-flex;
    color: var(--idsc-icon-color, #22c55e);
}
.idsc-icon-list__icon svg {
    display: block;
}
.idsc-icon-list--small .idsc-icon-list__icon svg { width: 14px; height: 14px; }
.idsc-icon-list--medium .idsc-icon-list__icon svg { width: 18px; height: 18px; }
.idsc-icon-list--large .idsc-icon-list__icon svg { width: 24px; height: 24px; }
.idsc-icon-list__text {
    font-size: 15px;
    line-height: 1.5;
    color: #374151;
}

/* ══════════════════════════════════════
   Social Links
   ══════════════════════════════════════ */
.idsc-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.idsc-social--align-left   { justify-content: flex-start; }
.idsc-social--align-center { justify-content: center; }
.idsc-social--align-right  { justify-content: flex-end; }

.idsc-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.15s, opacity 0.15s;
}
.idsc-social-link:hover { transform: scale(1.1); opacity: 0.85; }
.idsc-social-link svg { display: block; fill: currentColor; }

/* Sizes */
.idsc-social--small .idsc-social-link  { width: 32px; height: 32px; }
.idsc-social--small .idsc-social-link svg { width: 16px; height: 16px; }
.idsc-social--medium .idsc-social-link { width: 40px; height: 40px; }
.idsc-social--medium .idsc-social-link svg { width: 20px; height: 20px; }
.idsc-social--large .idsc-social-link  { width: 52px; height: 52px; }
.idsc-social--large .idsc-social-link svg { width: 26px; height: 26px; }

/* Shapes */
.idsc-social--square .idsc-social-link  { border-radius: 0; }
.idsc-social--rounded .idsc-social-link { border-radius: 6px; }
.idsc-social--circle .idsc-social-link  { border-radius: 50%; }

/* Filled style */
.idsc-social--filled .idsc-social-link { color: #fff; }
.idsc-social--filled .idsc-social-link--facebook  { background: #1877f2; }
.idsc-social--filled .idsc-social-link--twitter    { background: #000; }
.idsc-social--filled .idsc-social-link--instagram  { background: #e4405f; }
.idsc-social--filled .idsc-social-link--linkedin   { background: #0a66c2; }
.idsc-social--filled .idsc-social-link--youtube    { background: #ff0000; }
.idsc-social--filled .idsc-social-link--tiktok     { background: #000; }
.idsc-social--filled .idsc-social-link--pinterest  { background: #bd081c; }
.idsc-social--filled .idsc-social-link--github     { background: #181717; }
.idsc-social--filled .idsc-social-link--dribbble   { background: #ea4c89; }
.idsc-social--filled .idsc-social-link--email      { background: #6b7280; }
.idsc-social--filled .idsc-social-link--website    { background: #6b7280; }
.idsc-social--filled .idsc-social-link--rss        { background: #f26522; }

/* Outline style */
.idsc-social--outline .idsc-social-link { border: 2px solid; background: transparent; }
.idsc-social--outline .idsc-social-link--facebook  { color: #1877f2; }
.idsc-social--outline .idsc-social-link--twitter    { color: #000; }
.idsc-social--outline .idsc-social-link--instagram  { color: #e4405f; }
.idsc-social--outline .idsc-social-link--linkedin   { color: #0a66c2; }
.idsc-social--outline .idsc-social-link--youtube    { color: #ff0000; }
.idsc-social--outline .idsc-social-link--tiktok     { color: #000; }
.idsc-social--outline .idsc-social-link--pinterest  { color: #bd081c; }
.idsc-social--outline .idsc-social-link--github     { color: #181717; }
.idsc-social--outline .idsc-social-link--dribbble   { color: #ea4c89; }
.idsc-social--outline .idsc-social-link--email      { color: #6b7280; }
.idsc-social--outline .idsc-social-link--website    { color: #6b7280; }
.idsc-social--outline .idsc-social-link--rss        { color: #f26522; }

/* Plain style */
.idsc-social--plain .idsc-social-link { background: none; }
.idsc-social--plain .idsc-social-link--facebook  { color: #1877f2; }
.idsc-social--plain .idsc-social-link--twitter    { color: #000; }
.idsc-social--plain .idsc-social-link--instagram  { color: #e4405f; }
.idsc-social--plain .idsc-social-link--linkedin   { color: #0a66c2; }
.idsc-social--plain .idsc-social-link--youtube    { color: #ff0000; }
.idsc-social--plain .idsc-social-link--tiktok     { color: #000; }
.idsc-social--plain .idsc-social-link--pinterest  { color: #bd081c; }
.idsc-social--plain .idsc-social-link--github     { color: #181717; }
.idsc-social--plain .idsc-social-link--dribbble   { color: #ea4c89; }
.idsc-social--plain .idsc-social-link--email      { color: #6b7280; }
.idsc-social--plain .idsc-social-link--website    { color: #6b7280; }
.idsc-social--plain .idsc-social-link--rss        { color: #f26522; }

/* Custom color override */
.idsc-social--custom .idsc-social-link { color: var(--idsc-social-color, #333); }
.idsc-social--custom.idsc-social--filled .idsc-social-link { background: var(--idsc-social-color, #333); color: #fff; }
.idsc-social--custom.idsc-social--outline .idsc-social-link { border-color: var(--idsc-social-color, #333); color: var(--idsc-social-color, #333); }

/* ══════════════════════════════════════
   Accordion
   ══════════════════════════════════════ */
.idsc-accordion {
    margin-bottom: 20px;
}
.idsc-accordion__item {
    margin-bottom: 0;
}
.idsc-accordion--bordered .idsc-accordion__item {
    border: 1px solid #e5e7eb;
}
.idsc-accordion--bordered .idsc-accordion__item + .idsc-accordion__item {
    border-top: none;
}
.idsc-accordion--bordered .idsc-accordion__item:first-child { border-radius: 6px 6px 0 0; }
.idsc-accordion--bordered .idsc-accordion__item:last-child  { border-radius: 0 0 6px 6px; }
.idsc-accordion--bordered .idsc-accordion__item:only-child  { border-radius: 6px; }

.idsc-accordion--separated .idsc-accordion__item {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 8px;
}

.idsc-accordion__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    background: #fafafa;
    list-style: none;
    user-select: none;
    transition: background 0.15s;
}
.idsc-accordion__header:hover { background: #f3f4f6; }
.idsc-accordion__header::-webkit-details-marker { display: none; }

.idsc-accordion__title { flex: 1; }

.idsc-accordion__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}
.idsc-accordion__icon svg { width: 100%; height: 100%; }

.idsc-accordion__item[open] > .idsc-accordion__header .idsc-accordion__icon {
    transform: rotate(180deg);
}
.idsc-accordion__item[open] > .idsc-accordion__header .idsc-accordion__icon--pm .idsc-accordion__plus-v {
    opacity: 0;
}
.idsc-accordion__icon--pm { transform: none !important; }
.idsc-accordion__icon--pm .idsc-accordion__plus-v { transition: opacity 0.2s; }

.idsc-accordion__body {
    padding: 16px 18px;
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    border-top: 1px solid #e5e7eb;
}
.idsc-accordion__body p:last-child { margin-bottom: 0; }

/* ══════════════════════════════════════
   Gallery
   ══════════════════════════════════════ */
.idsc-gallery {
    display: grid;
    margin-bottom: 20px;
}
.idsc-gallery__item {
    margin: 0;
    overflow: hidden;
}
.idsc-gallery__img {
    display: block;
    width: 100%;
    height: auto;
}
/* Aspect ratios */
.idsc-gallery--square .idsc-gallery__item,
.idsc-gallery--4x3 .idsc-gallery__item,
.idsc-gallery--16x9 .idsc-gallery__item { position: relative; overflow: hidden; }

.idsc-gallery--square .idsc-gallery__item { aspect-ratio: 1; }
.idsc-gallery--4x3 .idsc-gallery__item   { aspect-ratio: 4/3; }
.idsc-gallery--16x9 .idsc-gallery__item  { aspect-ratio: 16/9; }

.idsc-gallery--square .idsc-gallery__img,
.idsc-gallery--4x3 .idsc-gallery__img,
.idsc-gallery--16x9 .idsc-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.idsc-gallery__caption {
    padding: 8px 4px;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

/* ══════════════════════════════════════
   Tabs
   ══════════════════════════════════════ */
.idsc-tabs {
    margin-bottom: 20px;
}
.idsc-tabs__nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
}
.idsc-tabs--align-left .idsc-tabs__nav   { justify-content: flex-start; }
.idsc-tabs--align-center .idsc-tabs__nav { justify-content: center; }
.idsc-tabs--align-right .idsc-tabs__nav  { justify-content: flex-end; }

.idsc-tabs__btn {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.idsc-tabs__btn:hover { color: #111827; }
.idsc-tabs__btn--active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}
.idsc-tabs__panel {
    padding: 20px 4px;
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
}
.idsc-tabs__panel[hidden] { display: none; }
.idsc-tabs__panel p:last-child { margin-bottom: 0; }

/* Vertical layout */
.idsc-tabs--vertical {
    display: flex;
    gap: 0;
}
.idsc-tabs--vertical .idsc-tabs__nav {
    flex-direction: column;
    border-bottom: none;
    border-right: 2px solid #e5e7eb;
    min-width: 160px;
}
.idsc-tabs--vertical .idsc-tabs__btn {
    text-align: left;
    border-bottom: none;
    border-right: 2px solid transparent;
    margin-bottom: 0;
    margin-right: -2px;
}
.idsc-tabs--vertical .idsc-tabs__btn--active {
    border-right-color: #3b82f6;
}
.idsc-tabs--vertical .idsc-tabs__panel {
    flex: 1;
    padding: 4px 20px;
}

/* ══════════════════════════════════════
   Counter
   ══════════════════════════════════════ */
.idsc-counter {
    text-align: center;
    margin-bottom: 20px;
}
.idsc-counter__number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
}
.idsc-counter__prefix,
.idsc-counter__suffix {
    font-size: 0.7em;
    color: #6b7280;
}
.idsc-counter__label {
    font-size: 16px;
    color: #6b7280;
    margin-top: 4px;
}

/* ══════════════════════════════════════
   Table of Contents
   ══════════════════════════════════════ */
.idsc-toc {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}
.idsc-toc__title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
    cursor: default;
}
details.idsc-toc > .idsc-toc__title { cursor: pointer; list-style: none; }
details.idsc-toc > .idsc-toc__title::-webkit-details-marker { display: none; }
details.idsc-toc > .idsc-toc__title::before {
    content: "\25B6";
    display: inline-block;
    margin-right: 8px;
    font-size: 10px;
    transition: transform 0.2s;
}
details.idsc-toc[open] > .idsc-toc__title::before {
    transform: rotate(90deg);
}

.idsc-toc__list {
    margin: 0;
    padding-left: 20px;
}
.idsc-toc__item {
    padding: 4px 0;
}
.idsc-toc__item a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
}
.idsc-toc__item a:hover { text-decoration: underline; }

/* ══════════════════════════════════════
   Map
   ══════════════════════════════════════ */
.idsc-map {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #e5e7eb;
}
.idsc-map__iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ══════════════════════════════════════
   Responsive
   ══════════════════════════════════════ */
@media (max-width: 600px) {
    .idsc-card--img-left,
    .idsc-card--img-right { flex-direction: column; }
    .idsc-card--img-left .idsc-card__media,
    .idsc-card--img-right .idsc-card__media { width: 100%; }

    .idsc-tabs--vertical { flex-direction: column; }
    .idsc-tabs--vertical .idsc-tabs__nav {
        flex-direction: row;
        border-right: none;
        border-bottom: 2px solid #e5e7eb;
        min-width: auto;
        overflow-x: auto;
    }
    .idsc-tabs--vertical .idsc-tabs__btn {
        border-right: none;
        border-bottom: 2px solid transparent;
        margin-right: 0;
        margin-bottom: -2px;
    }
    .idsc-tabs--vertical .idsc-tabs__btn--active {
        border-right-color: transparent;
        border-bottom-color: #3b82f6;
    }

    .idsc-counter__number { font-size: 36px; }
}
