/* ============================================
   Instagram Widget Auth - Stylesheet
   Prefix: ig-auth
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f6f8;
  color: #333;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* === Container === */
.ig-auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

/* === Card === */
.ig-auth-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
}

/* === Logo / Title === */
.ig-auth-logo {
  text-align: center;
  margin-bottom: 8px;
}

.ig-auth-logo svg {
  width: 40px;
  height: 40px;
  color: #c13584;
}

.ig-auth-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  margin: 0 0 4px;
}

.ig-auth-subtitle {
  font-size: 14px;
  color: #888;
  text-align: center;
  margin: 0 0 28px;
}

/* === Form === */
.ig-auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ig-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ig-auth-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.ig-auth-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 15px;
  color: #333;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.ig-auth-input:focus {
  border-color: #c13584;
  box-shadow: 0 0 0 3px rgba(193, 53, 132, 0.1);
}

.ig-auth-input.is-error {
  border-color: #e53e3e;
}

/* === Field Error === */
.ig-auth-error {
  font-size: 13px;
  color: #e53e3e;
  min-height: 18px;
}

/* === Button === */
.ig-auth-button {
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  min-height: 48px;
}

.ig-auth-button:hover:not(:disabled) {
  opacity: 0.92;
}

.ig-auth-button:active:not(:disabled) {
  transform: scale(0.98);
}

.ig-auth-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ig-auth-button.is-loading {
  position: relative;
  color: transparent;
}

.ig-auth-button.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ig-auth-spin 0.6s linear infinite;
}

@keyframes ig-auth-spin {
  to { transform: rotate(360deg); }
}

/* === Links === */
.ig-auth-links {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #888;
}

.ig-auth-links a {
  color: #c13584;
  text-decoration: none;
  font-weight: 500;
}

.ig-auth-links a:hover {
  text-decoration: underline;
}

.ig-auth-links p {
  margin: 8px 0;
}

/* === Message (success / info) === */
.ig-auth-message {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}

.ig-auth-message.is-visible {
  display: block;
}

.ig-auth-message.is-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.ig-auth-message.is-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.ig-auth-message.is-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* === Responsive === */
@media (max-width: 480px) {
  .ig-auth-card {
    padding: 32px 20px;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
  }

  .ig-auth-container {
    padding: 0;
    align-items: flex-start;
  }
}
