/* ChatGPT Conversation Styles */

.chatgpt-loading {
  text-align: center;
  padding: 60px 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.chatgpt-embed {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  margin: 30px 0;
}

.chatgpt-header {
  background: linear-gradient(135deg, #10a37f 0%, #1a7f64 100%);
  color: white;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.chatgpt-icon {
  font-size: 2em;
}

.chatgpt-info {
  flex: 1;
}

.chatgpt-info h3 {
  margin: 0 0 5px 0;
  font-size: 1.2em;
  color: white;
}

.chatgpt-info p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.9em;
}

.chatgpt-open-btn {
  background-color: rgba(255,255,255,0.2);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  border: 1px solid rgba(255,255,255,0.3);
}

.chatgpt-open-btn:hover {
  background-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

.chatgpt-iframe-container {
  position: relative;
  background-color: #f8f9fa;
}

.chatgpt-iframe-container iframe {
  display: block;
  width: 100%;
  min-height: 800px;
  border: none;
}

.chatgpt-fallback {
  display: none;
  padding: 60px 40px;
  text-align: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.chatgpt-iframe-container iframe:invalid ~ .chatgpt-fallback,
.chatgpt-iframe-container iframe[src=""]:invalid ~ .chatgpt-fallback {
  display: block;
}

.chatgpt-fallback p {
  color: #666;
  margin-bottom: 15px;
  font-size: 1.1em;
}

.chatgpt-link-btn {
  display: inline-block;
  background: linear-gradient(135deg, #10a37f 0%, #1a7f64 100%);
  color: white;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(16, 163, 127, 0.3);
  margin-top: 20px;
}

.chatgpt-link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 163, 127, 0.4);
}

.chatgpt-error {
  background-color: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  margin: 30px 0;
}

.chatgpt-error h3 {
  color: #856404;
  margin-top: 0;
  margin-bottom: 15px;
}

.chatgpt-error p {
  color: #856404;
  margin-bottom: 25px;
  font-size: 1.05em;
}

/* Message Styles (if we can parse messages) */
.chatgpt-messages {
  padding: 20px;
  background-color: #f8f9fa;
}

.chatgpt-message {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chatgpt-user {
  border-left: 4px solid #667eea;
}

.chatgpt-assistant {
  border-left: 4px solid #10a37f;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.message-icon {
  font-size: 1.5em;
}

.message-role {
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 0.5px;
}

.message-content {
  line-height: 1.7;
  color: #333;
}

.message-content code {
  background-color: #f4f4f4;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.message-content strong {
  color: #667eea;
  font-weight: 600;
}

/* Alternative: Simple Link Card */
.chatgpt-card {
  background: linear-gradient(135deg, #10a37f 0%, #1a7f64 100%);
  color: white;
  border-radius: 12px;
  padding: 30px;
  margin: 30px 0;
  box-shadow: 0 4px 20px rgba(16, 163, 127, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
}

.chatgpt-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(16, 163, 127, 0.3);
}

.chatgpt-card h3 {
  color: white;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5em;
}

.chatgpt-card p {
  opacity: 0.95;
  margin-bottom: 20px;
  font-size: 1.05em;
  line-height: 1.6;
}

.chatgpt-card a {
  display: inline-block;
  background-color: white;
  color: #10a37f;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.chatgpt-card a:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(255,255,255,0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .chatgpt-header {
    flex-direction: column;
    text-align: center;
  }

  .chatgpt-iframe-container iframe {
    min-height: 600px;
  }

  .chatgpt-fallback {
    padding: 40px 20px;
  }
}
