/* ---------------------------------------------------------
   WR Instagram Story Widget (Clean Reset)
   File: assets/css/instagram-story.css
---------------------------------------------------------- */

/* GENEL RESET – sadece bu widget alanında */
.wr-instagram-story-wrapper,
.wr-instagram-story-wrapper * {
    box-sizing: border-box;
}

/* ROOT WRAPPER */
.wr-instagram-story-wrapper {
    position: relative;
    display: flex;
    width: 100%;
    justify-content: flex-start;
    padding: 6px 0;
}

/* LIST (HORIZONTAL STORIES) */
.wr-instagram-story-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
    overflow-x: auto;
    padding: 8px 2px 4px;
    scrollbar-width: thin;
}

/* WebKit scrollbar */
.wr-instagram-story-list::-webkit-scrollbar {
    height: 6px;
}
.wr-instagram-story-list::-webkit-scrollbar-track {
    background: transparent;
}
.wr-instagram-story-list::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
}

/* SINGLE ITEM */
.wr-is-item {
    flex: 0 0 auto;
    text-align: center;
    cursor: pointer;
}

/* THUMB WRAPPER (GRADIENT BORDER) */
.wr-is-thumb-wrapper {
    padding: 2px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff7a00, #ff0069, #d300c5);
}

/* THUMB (CIRCLE) */
.wr-is-thumb {
    width: 68px;
    height: 68px;
    border-radius: 999px;
    overflow: hidden;
    border: 2px solid #ffffff;
    background-color: #f5f5f5;
}

/* THUMB IMAGE */
.wr-is-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* LABEL UNDER CIRCLE */
.wr-is-label {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #111111;
    text-align: center;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ACTIVE STATE (modal açıkken) */
.wr-is-item.is-active .wr-is-thumb-wrapper {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
}

/* ------------------------------------------
   STORY LIST ARROWS
------------------------------------------- */
.wr-instagram-story-arrows {
    position: absolute;
    top: -12px;
    right: 0;
    display: flex;
    gap: 8px;
    z-index: 999;
}

.wr-story-arrow {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ffffff;
    color: #000;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: .2s ease;
}

.wr-story-arrow:hover {
    background: #000;
    color: #fff;
}

/* Mobile / tablet – okları gizle */
@media (max-width: 768px) {
    .wr-instagram-story-arrows {
        display: none;
    }
}

/* ------------------------------------------
   FULLSCREEN MODAL
------------------------------------------- */
.wr-is-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.wr-instagram-story-wrapper.wr-is-open .wr-is-modal {
    display: flex;
}

/* Body scroll kilidi */
body.wr-is-no-scroll {
    overflow: hidden !important;
}

/* MODAL INNER */
.wr-is-modal-inner {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    margin: 0 auto;
    background: #000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* HEADER */
.wr-is-modal-header {
    padding: 12px 14px;
    position: relative;
}

.wr-is-modal-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: #ffffff;
}

.wr-is-modal-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wr-is-modal-label {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.wr-is-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

/* BODY */
.wr-is-modal-body {
    position: relative;
    flex: 1;
    overflow: hidden;
}

/* MODAL IMAGE – centered & contained
   Dikey görseller küçültüldü ki altta başlık+link için alan kalsın */
.wr-is-modal-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: calc(100vh - 260px); /* ÖNEMLİ: daha küçük, böylece title+link görünür */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}

/* TEXT AREA (title + link) */
.wr-is-modal-text {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    text-align: center;
    z-index: 20; /* her zaman resmin üstünde */
}

.wr-is-modal-title {
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* LINK BUTTON */
.wr-is-modal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 999px;
    border: 1px solid #ffffff;
    background: rgba(0,0,0,0.55);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    min-width: 140px;
}

.wr-is-modal-link:hover {
    background: #ffffff;
    color: #000000;
}

.wr-is-modal-link[hidden] {
    display: none !important;
}

/* CLICK AREAS */
.wr-is-modal-click {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    cursor: pointer;
}

.wr-is-modal-click-prev { left: 0; }
.wr-is-modal-click-next { right: 0; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .wr-is-modal-inner {
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }
}

/* ---------------------------------------------------------
   MODAL DESKTOP ARROWS (inside modal)
---------------------------------------------------------- */

.wr-is-modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;

    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 22px;

    display: flex;
    justify-content: center;
    align-items: center;

    backdrop-filter: blur(6px);
    transition: 0.2s ease;
}

.wr-is-modal-arrow:hover {
    background: rgba(255,255,255,0.35);
}

/* Left / Right positions */
.wr-is-modal-arrow.modal-prev {
    left: 12px;
}

.wr-is-modal-arrow.modal-next {
    right: 12px;
}

/* Mobile – hide arrows completely */
@media (max-width: 768px) {
    .wr-is-modal-arrow {
        display: none !important;
    }
}
