/* app/assets/stylesheets/instances.css */

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 1. INSTANCE CARDS (The Glass Panels)                                        */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Container for the index list - Grid Layout */
#instances {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
  padding: 10px 0;
}

/* The individual instance card style */
.instance-card {
  background: rgba(255, 255, 255, 0.65); /* Semi-transparent white */
  backdrop-filter: blur(12px);           /* Glass blur effect */
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;                   /* Very round corners */
  padding: 25px;
  box-shadow: 
    0 10px 25px rgba(163, 196, 226, 0.25), /* Soft blue shadow */
    inset 0 0 0 1px rgba(255, 255, 255, 0.5); /* Inner shine */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Hover effect: Card floats up */
.instance-card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 15px 35px rgba(163, 196, 226, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.8);
}

/* Typography inside cards */
.instance-card p {
  margin: 5px 0;
  color: #4a5568;
  font-size: 15px;
  line-height: 1.6;
}

.instance-card strong {
  color: #2b6cb0; /* Deep blue for labels */
  font-weight: 600;
}

/* Status Badge - Overrides inline style slightly for better shape */
.instance-card span[style*="color"] {
  display: inline-block;
  padding: 2px 12px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  font-size: 0.9em;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 2. QR CODE STYLING                                                          */
/* ═══════════════════════════════════════════════════════════════════════════ */

.qr-code-container {
  display: flex;
  justify-content: center;
  margin: 15px 0;
  background: rgba(255, 255, 255, 0.5);
  padding: 15px;
  border-radius: 20px;
}

.qr-code-img {
  border-radius: 12px; /* Smooth corners for the QR */
  border: none !important; /* Remove the inline gray border */
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 3. BUTTONS (Bubbles)                                                        */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* General button style */
.btn-bubble {
  display: inline-block;
  padding: 10px 20px;
  margin: 5px 5px 5px 0;
  text-decoration: none;
  border-radius: 30px; /* Pill shape */
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Primary Action (View Inbox, Show) - Blue Gradient */
.btn-primary {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
  color: white;
}

/* Secondary Action (Edit, Back) - White/Light */
.btn-secondary {
  background: white;
  color: #3182ce;
  border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
  background: #f7fafc;
  transform: translateY(-2px);
  color: #2c5282;
}

/* Danger Action (Destroy) - Red Gradient */
.btn-danger {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%); 
  /* Or a sharper red for delete */
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5253 100%);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

/* Action Bar Container */
.actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 4. FORMS (Soft Inputs)                                                      */
/* ═══════════════════════════════════════════════════════════════════════════ */

form div {
  margin-bottom: 20px;
}

form label {
  color: #2d3748;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

form input[type="text"] {
  width: 100%;
  max-width: 400px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  color: #4a5568;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

form input[type="text"]:focus {
  outline: none;
  background: white;
  border-color: #4facfe;
  box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

form input[type="submit"] {
  @extend .btn-bubble;
  @extend .btn-primary;
  font-size: 16px;
  padding: 12px 30px;
}
