/* Premium Instagram Story share UI — mobil öncelikli */

.ig-story-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(120deg, #c026d3 0%, #e11d48 45%, #f97316 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
.ig-story-btn:hover:not(:disabled) {
  opacity: 0.95;
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.35);
}
.ig-story-btn:focus-visible {
  outline: 2px solid #e11d48;
  outline-offset: 2px;
}
.ig-story-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.ig-story-btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.ig-story-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ig-story-overlay.is-open {
  display: flex;
}
@media (min-width: 768px) {
  .ig-story-overlay {
    align-items: center;
    padding: 1.25rem;
  }
}

.ig-story-sheet {
  width: 100%;
  max-width: 28rem;
  max-height: min(94vh, 920px);
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #0f172a;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
@media (min-width: 768px) {
  .ig-story-sheet {
    border-radius: 1.25rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  }
}
@media (prefers-color-scheme: dark) {
  .ig-story-sheet {
    background: #0f172a;
    color: #f8fafc;
  }
}

.ig-story-handle {
  display: flex;
  justify-content: center;
  padding: 0.55rem 0 0.15rem;
}
.ig-story-handle span {
  width: 2.5rem;
  height: 0.28rem;
  border-radius: 999px;
  background: #cbd5e1;
}
@media (min-width: 768px) {
  .ig-story-handle { display: none; }
}

.ig-story-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
.ig-story-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}
.ig-story-header p {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}
@media (prefers-color-scheme: dark) {
  .ig-story-header p { color: #94a3b8; }
}
.ig-story-close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.15rem 0.4rem;
  border-radius: 0.5rem;
  cursor: pointer;
}
.ig-story-close:focus-visible {
  outline: 2px solid #e11d48;
  outline-offset: 2px;
}

.ig-story-body {
  padding: 0.85rem 1rem 0.5rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.ig-story-meta {
  margin-bottom: 0.75rem;
}
.ig-story-meta-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ig-story-meta-summary {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .ig-story-meta-summary { color: #94a3b8; }
}

.ig-themes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.ig-theme-card {
  appearance: none;
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.85rem;
  padding: 0.55rem 0.4rem;
  background: rgba(248, 250, 252, 0.9);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
@media (prefers-color-scheme: dark) {
  .ig-theme-card { background: rgba(30, 41, 59, 0.9); }
}
.ig-theme-card.is-active {
  border-color: #e11d48;
  box-shadow: 0 0 0 1px rgba(225, 29, 72, 0.35);
}
.ig-theme-card:focus-visible {
  outline: 2px solid #e11d48;
  outline-offset: 2px;
}
.ig-theme-swatch {
  height: 1.65rem;
  border-radius: 0.45rem;
  margin-bottom: 0.35rem;
}
.ig-theme-swatch.editorial {
  background: linear-gradient(135deg, #0f172a, #f97316);
}
.ig-theme-swatch.breaking {
  background: linear-gradient(135deg, #111, #dc2626);
}
.ig-theme-swatch.minimal {
  background: linear-gradient(135deg, #f8fafc, #1e40af);
}
.ig-theme-card strong {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
}
.ig-theme-card span {
  display: block;
  font-size: 0.6rem;
  color: #64748b;
  line-height: 1.3;
  margin-top: 0.15rem;
}

.ig-preview-wrap {
  position: relative;
  width: min(100%, 280px);
  margin: 0 auto 0.75rem;
  aspect-ratio: 9 / 16;
  border-radius: 1rem;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.35);
}
.ig-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0f172a;
}
.ig-preview-wrap img[hidden] {
  display: none;
}

.ig-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, #1e293b 8%, #334155 18%, #1e293b 33%);
  background-size: 200% 100%;
  animation: ig-shimmer 1.2s linear infinite;
}
.ig-skeleton[hidden] { display: none; }
@keyframes ig-shimmer {
  to { background-position-x: -200%; }
}

.ig-status {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  min-height: 1.25rem;
  margin: 0 0 0.5rem;
}
.ig-error {
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  background: #fff1f2;
  color: #9f1239;
  font-size: 0.8rem;
}
@media (prefers-color-scheme: dark) {
  .ig-error { background: rgba(127, 29, 29, 0.35); color: #fecdd3; }
}
.ig-hint {
  margin: 0 0 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.78rem;
}
@media (prefers-color-scheme: dark) {
  .ig-hint { background: rgba(120, 53, 15, 0.35); color: #fde68a; }
}

.ig-story-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.75rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(248, 250, 252, 0.95);
}
@media (prefers-color-scheme: dark) {
  .ig-story-actions { background: rgba(15, 23, 42, 0.95); }
}
.ig-story-actions .ig-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 0.55rem 0.75rem;
}
.ig-btn-secondary {
  background: #fff;
  color: #0f172a;
  border: 1px solid #e2e8f0 !important;
}
@media (prefers-color-scheme: dark) {
  .ig-btn-secondary {
    background: #1e293b;
    color: #f8fafc;
    border-color: #334155 !important;
  }
}
.ig-btn-primary {
  grid-column: 1 / -1;
  color: #fff;
  background: linear-gradient(120deg, #c026d3, #e11d48 50%, #f97316);
}
.ig-btn-ghost {
  background: transparent;
  color: inherit;
  border: 1px solid transparent !important;
}
.ig-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ig-btn:focus-visible {
  outline: 2px solid #e11d48;
  outline-offset: 2px;
}

@media (max-width: 380px) {
  .ig-theme-card span { display: none; }
  .ig-preview-wrap { width: min(100%, 240px); }
}
