/* instaPhoto (instaphoto.ql) — profil na laptopie. Wspólne dla scen z serii Kamili Borg, logika w js/instaphoto.js */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
    'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji';
  background: #fff; color: #111; font-size: 14px; line-height: 1.4;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* --- Pasek boczny --- */
.ip-side {
  position: fixed; top: 0; left: 0; bottom: 0; width: 240px; padding: 26px 12px 20px;
  border-right: 1px solid #dbdbdb; background: #fff; display: flex; flex-direction: column; gap: 4px; z-index: 5;
}
.ip-logo {
  font-size: 27px; font-weight: 800; font-style: italic; letter-spacing: -.5px; padding: 0 12px 26px;
  background: linear-gradient(90deg, #f9a03f 0%, #e1306c 45%, #833ab4 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ip-nav { display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: 8px; font-size: 16px; }
.ip-nav:hover { background: #f2f2f2; }
.ip-nav i { font-size: 24px; width: 26px; text-align: center; }
.ip-nav img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.ip-nav.on { font-weight: 700; }
.ip-side .push { margin-top: auto; }
.ip-nav { position: relative; }
.ip-badge {
  position: absolute; left: 30px; top: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #ff3040; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.ip-badge[hidden] { display: none; }

/* --- Wiadomość prywatna (okno w prawym dolnym rogu) --- */
.ip-dm {
  position: fixed; right: 28px; bottom: 0; z-index: 60; width: 380px; height: 500px; max-height: calc(100vh - 20px);
  background: #fff; border-radius: 14px 14px 0 0; box-shadow: 0 6px 30px rgba(0,0,0,.25);
  display: flex; flex-direction: column; overflow: hidden; animation: ip-up .35s ease;
}
.ip-dm[hidden] { display: none; }
@keyframes ip-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.ip-dm-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #efefef; font-size: 20px; }
.ip-dm-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.ip-dm-head div { flex: 1; display: flex; flex-direction: column; font-size: 15px; line-height: 1.2; }
.ip-dm-head div span { font-size: 12px; color: #737373; }
.ip-dm-head i { cursor: pointer; }
.ip-dm-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.ip-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 80%; animation: ip-in .3s ease; }
.ip-msg img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.ip-msg span { padding: 10px 14px; border-radius: 20px; font-size: 16px; line-height: 1.3; word-wrap: break-word; }
.ip-msg.in span { background: #efefef; }
.ip-msg.out { align-self: flex-end; }
.ip-msg.out span { background: #3797f0; color: #fff; }
.ip-msg-status { align-self: flex-end; font-size: 11px; color: #737373; margin-top: -4px; }
.ip-msg.typing span { display: flex; gap: 4px; padding: 14px 16px; }
.ip-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: #9a9a9a; animation: ip-dot 1s infinite; }
.ip-msg.typing i:nth-child(2) { animation-delay: .15s; }
.ip-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ip-dot { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.ip-dm-foot { margin: 0 12px 12px; padding: 8px 14px; border: 1px solid #dbdbdb; border-radius: 22px; display: flex; align-items: center; gap: 10px; }
.ip-dm-foot i { font-size: 22px; }
.ip-dm-foot input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 15px; background: transparent; }
.ip-dm-foot .pub { color: #0095f6; font-weight: 700; opacity: .4; }
.ip-dm-foot .pub.ready { opacity: 1; }

/* --- Więcej → Ustawienia → Usuń konto --- */
.ip-more {
  position: fixed; left: 14px; bottom: 76px; z-index: 30; width: 266px; padding: 8px; background: #fff;
  border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,.18);
}
.ip-more[hidden] { display: none; }
.ip-more-item { display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: 8px; font-size: 15px; cursor: pointer; }
.ip-more-item:hover { background: #f2f2f2; }
.ip-more-item i { font-size: 20px; }
.ip-more-sep { height: 6px; margin: 6px -8px; background: #f2f2f2; }
.ip-settings { display: flex; max-width: 960px; margin: 0 auto; gap: 40px; }
.ip-set-nav { width: 260px; flex: none; display: flex; flex-direction: column; gap: 2px; }
.ip-set-nav h2, .ip-set-main h2 { font-size: 22px; font-weight: 700; margin-bottom: 18px; }
.ip-set-nav span { padding: 12px 14px; border-radius: 8px; font-size: 15px; }
.ip-set-nav span.on { background: #efefef; font-weight: 600; }
.ip-set-main { flex: 1; }
.ip-set-row { display: flex; align-items: center; gap: 14px; padding: 16px; background: #fafafa; border-radius: 14px; margin-bottom: 14px; font-size: 16px; }
.ip-set-row img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.ip-set-item { display: flex; justify-content: space-between; align-items: center; padding: 16px 4px; border-bottom: 1px solid #efefef; font-size: 15px; }
.ip-set-danger { margin-top: 30px; padding: 20px; border: 1px solid #f3c7cb; border-radius: 14px; }
.ip-set-danger b { font-size: 17px; color: #ed4956; }
.ip-set-danger p { color: #737373; margin: 6px 0 16px; }
.ip-btn.danger { background: #ed4956; color: #fff; height: 40px; padding: 0 22px; font-size: 15px; }
.ip-btn.danger:hover { background: #d83545; }
.ip-deleted { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.5); display: grid; place-items: center; animation: ip-fade .3s ease; }
@keyframes ip-fade { from { opacity: 0; } to { opacity: 1; } }
.ip-deleted-card {
  background: #fff; border-radius: 18px; padding: 40px 56px; text-align: center; max-width: 560px;
  font-size: 30px; font-weight: 800; line-height: 1.25; box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.ip-deleted-icon { width: 84px; height: 84px; margin: 0 auto 20px; border-radius: 50%; background: #fdecee; color: #ed4956; display: grid; place-items: center; font-size: 42px; }

/* --- Profil --- */
.ip-main { margin-left: 240px; padding: 34px 40px 60px; }
.ip-profile { max-width: 935px; margin: 0 auto; display: flex; align-items: center; gap: 70px; padding: 0 40px 40px; }
.ip-avatar-ring {
  flex: none; width: 160px; height: 160px; border-radius: 50%; padding: 4px;
  background: conic-gradient(from 200deg, #f9a03f, #e1306c, #833ab4, #f9a03f);
}
.ip-avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid #fff; display: block; }
.ip-name { font-size: 40px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.ip-buttons { display: flex; gap: 8px; margin-top: 20px; }
.ip-btn { height: 34px; padding: 0 18px; border-radius: 8px; background: #efefef; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.ip-btn:hover { background: #dbdbdb; }
.ip-btn.follow { background: #0095f6; color: #fff; }
.ip-btn.follow:hover { background: #1877f2; }

.ip-tabs { max-width: 935px; margin: 0 auto; border-top: 1px solid #dbdbdb; display: flex; justify-content: center; gap: 60px; }
.ip-tabs span { padding: 16px 0; font-size: 12px; font-weight: 600; letter-spacing: 1px; color: #737373; display: flex; gap: 6px; align-items: center; }
.ip-tabs span.on { color: #111; border-top: 1px solid #111; margin-top: -1px; }

.ip-grid { max-width: 935px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ip-cell { position: relative; aspect-ratio: 1; background: #efefef; overflow: hidden; cursor: pointer; }
.ip-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ip-cell i { position: absolute; top: 10px; right: 10px; color: #fff; font-size: 20px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5)); }

/* --- Otwarty wpis (okienko na profilu) --- */
.ip-modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; }
.ip-modal[hidden] { display: none; }
.ip-close { position: absolute; top: 14px; right: 20px; color: #fff; font-size: 28px; }
.ip-card { display: flex; background: #fff; border-radius: 4px; overflow: hidden; height: min(88vh, 820px); max-width: calc(100vw - 120px); }
.ip-media { position: relative; height: 100%; aspect-ratio: 1; background: #000; overflow: hidden; flex: none; max-width: calc(100vw - 120px - 380px); }
.ip-track { display: flex; height: 100%; transition: transform .3s ease; }
.ip-slide { position: relative; flex: 0 0 100%; height: 100%; }
.ip-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; user-select: none; }
.ip-slide .frame { visibility: hidden; }
.ip-slide .frame.on { visibility: visible; }
.ip-arrow {
  position: absolute; top: 50%; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%;
  background: rgba(255,255,255,.85); color: #111; font-size: 16px; display: grid; place-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.ip-arrow.prev { left: 12px; }
.ip-arrow.next { right: 12px; }
.ip-arrow[hidden] { display: none; }
.ip-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 5px; }
.ip-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); }
.ip-dots i.on { background: #fff; }
.ip-reel-play { position: absolute; left: 50%; top: 50%; width: 80px; height: 80px; margin: -40px 0 0 -40px; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; display: grid; place-items: center; font-size: 40px; }

.ip-panel { width: 380px; flex: none; display: flex; flex-direction: column; border-left: 1px solid #efefef; }
.ip-panel-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #efefef; }
.ip-panel-head img, .ip-c img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.ip-panel-head b { font-size: 14px; }
.ip-panel-head .dot { color: #737373; }
.ip-panel-head .follow-link { color: #0095f6; font-weight: 600; }
.ip-panel-head .more { margin-left: auto; font-size: 18px; }
.ip-comments { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 16px; }
.ip-c { display: flex; gap: 12px; align-items: flex-start; }
.ip-c-body { flex: 1; min-width: 0; }
.ip-c-text { white-space: pre-line; word-wrap: break-word; font-size: 15px; }
.ip-c-text b { margin-right: 5px; }
.ip-c-meta { margin-top: 6px; font-size: 12px; color: #737373; display: flex; gap: 14px; font-weight: 600; }
.ip-c-meta span:first-child { font-weight: 400; }
.ip-replies { margin: 14px 0 0 0; display: flex; flex-direction: column; gap: 14px; }
.ip-c.new { animation: ip-in .4s ease; }
@keyframes ip-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ip-empty { color: #737373; text-align: center; margin: auto 0; font-size: 15px; }

.ip-panel-foot { border-top: 1px solid #efefef; padding: 8px 16px 0; }
.ip-actions { display: flex; align-items: center; gap: 16px; font-size: 24px; padding: 4px 0 6px; }
.ip-actions .save { margin-left: auto; }
.ip-like.on i { color: #ed4956; }
.ip-likes { font-weight: 700; }
.ip-time { font-size: 11px; color: #737373; text-transform: uppercase; letter-spacing: .3px; padding: 4px 0 12px; }

.ip-write { display: block; width: calc(100% + 32px); margin: 0 -16px; padding: 14px 16px; border-top: 1px solid #efefef; text-align: left; color: #737373; font-size: 15px; }
.ip-write:hover { background: #fafafa; }
.ip-write[hidden] { display: none; }
.ip-write i { margin-right: 8px; }
.ip-box { margin: 0 -16px; padding: 10px 16px 12px; border-top: 1px solid #efefef; }
.ip-box[hidden] { display: none; }
.ip-box-who { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.ip-box-who img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.ip-box-row { display: flex; align-items: center; gap: 10px; }
.ip-box-row i { font-size: 22px; color: #111; }
.ip-box-row input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 15px; padding: 6px 0; background: transparent; }
.ip-box-row .pub { color: #0095f6; font-weight: 700; opacity: .4; }
.ip-box-row .pub.ready { opacity: 1; }
