/**
 * AnsPress Modern Design for Udcourse.com
 * This file is automatically loaded by AnsPress
 * Version: 1.0
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@600;700;800&display=swap');

/* CSS Variables */
:root {
  --ap-primary: #3B82F6;
  --ap-primary-light: #60A5FA;
  --ap-primary-dark: #2563EB;
  --ap-secondary: #10B981;
  --ap-success: #10B981;
  --ap-warning: #F59E0B;
  --ap-error: #EF4444;
  --ap-info: #3B82F6;
  --ap-gray-50: #F9FAFB;
  --ap-gray-100: #F3F4F6;
  --ap-gray-200: #E5E7EB;
  --ap-gray-300: #D1D5DB;
  --ap-gray-500: #6B7280;
  --ap-gray-600: #4B5563;
  --ap-gray-700: #374151;
  --ap-gray-900: #111827;
  --ap-text-primary: #111827;
  --ap-text-secondary: #4B5563;
  --ap-text-tertiary: #6B7280;
  --ap-border: #E5E7EB;
  --ap-radius: 0.75rem;
  --ap-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --ap-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --ap-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --ap-transition: 200ms ease-in-out;
}

/* Base Typography */
body.anspress,
#anspress {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ap-text-primary);
}

/* Modern Question Cards */
#anspress .ap-questions-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem !important;
  margin-bottom: 1rem;
  background: #fff;
  border: 1px solid var(--ap-border) !important;
  border-radius: var(--ap-radius) !important;
  box-shadow: var(--ap-shadow-sm) !important;
  transition: all var(--ap-transition);
}

#anspress .ap-questions-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--ap-shadow-lg) !important;
  border-color: #BFDBFE !important;
}

/* Question Title */
#anspress .ap-questions-title {
  font-size: 1.125rem !important;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

#anspress .ap-questions-title a {
  color: var(--ap-text-primary) !important;
  text-decoration: none;
  transition: color var(--ap-transition);
}

#anspress .ap-questions-title a:hover {
  color: var(--ap-primary) !important;
}

/* Question Stats Badges */
#anspress .ap-questions-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--ap-gray-50) !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: 0.75rem !important;
  padding: 0.75rem !important;
  min-width: 60px;
  text-align: center;
  transition: all var(--ap-transition);
}

#anspress .ap-questions-count span {
  display: block;
  font-size: 1.25rem !important;
  font-weight: 700;
  color: var(--ap-primary) !important;
  margin-bottom: 0.25rem;
  border-bottom: none !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
}

#anspress .ap-questions-count.ap-questions-acount {
  border-color: var(--ap-secondary) !important;
}

#anspress .ap-questions-count.ap-questions-acount span {
  color: var(--ap-secondary) !important;
}

/* Avatars */
#anspress .ap-avatar img {
  border-radius: 9999px !important;
  border: 2px solid var(--ap-border);
  box-shadow: var(--ap-shadow-sm);
}

/* Modern Buttons */
.ap-btn,
.ap-btn-ask,
#anspress .ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem !important;
  font-weight: 600 !important;
  font-size: 1rem;
  line-height: 1.5;
  text-decoration: none;
  border-radius: 0.75rem !important;
  border: 1px solid transparent !important;
  cursor: pointer;
  transition: all var(--ap-transition);
  background: var(--ap-primary) !important;
  color: white !important;
  box-shadow: var(--ap-shadow-sm) !important;
  background-image: none !important;
}

.ap-btn:hover,
.ap-btn-ask:hover,
#anspress .ap-btn:hover {
  background: var(--ap-primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: var(--ap-shadow-md) !important;
}

.ap-btn:active,
#anspress .ap-btn:active {
  transform: translateY(0);
}

/* Ask Button (Prominent) */
#anspress .ap-btn-ask,
#anspress .ap-list-head .ap-btn-ask {
  padding: 0.75rem 1.5rem !important;
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3) !important;
}

/* Form Inputs */
.ap-form-control,
#anspress .ap-form-control {
  width: 100%;
  padding: 0.625rem 0.875rem !important;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ap-text-primary);
  background: white;
  border: 1px solid var(--ap-gray-300) !important;
  border-radius: 0.75rem !important;
  transition: all var(--ap-transition);
}

.ap-form-control:focus,
#anspress .ap-form-control:focus {
  outline: none;
  border-color: var(--ap-primary) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Form Labels */
.ap-form-label,
#anspress .ap-form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem !important;
  font-weight: 500;
  color: var(--ap-text-primary);
}

/* Tags */
.question-tags a,
#anspress .question-tags a,
#anspress .ap-post-tags a {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem !important;
  font-size: 0.875rem !important;
  font-weight: 500;
  border-radius: 0.5rem !important;
  text-decoration: none;
  background: #EFF6FF !important;
  color: #1E40AF !important;
  border: 1px solid #BFDBFE !important;
  transition: all var(--ap-transition);
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.question-tags a:hover,
#anspress .question-tags a:hover {
  background: var(--ap-primary) !important;
  color: white !important;
  border-color: var(--ap-primary) !important;
  transform: translateY(-1px);
}

/* Single Question Page */
#anspress #ap-single .ap-cell-inner {
  border: 1px solid var(--ap-border) !important;
  border-radius: 1rem !important;
  padding: 1.5rem !important;
  background: white;
  box-shadow: var(--ap-shadow-sm);
}

/* Question Meta Bar */
#anspress .ap-q-metas {
  background: var(--ap-gray-50) !important;
  border-bottom: 1px solid var(--ap-border) !important;
  padding: 1rem !important;
  font-size: 0.875rem !important;
  border-radius: 1rem 1rem 0 0 !important;
}

/* Answer Cards */
#anspress .answer {
  margin-top: 1.5rem !important;
}

#anspress .answer .ap-cell-inner {
  border: 1px solid var(--ap-border) !important;
  border-radius: 1rem !important;
  padding: 1.5rem !important;
  transition: all var(--ap-transition);
  background: white;
}

#anspress .answer .ap-cell-inner:hover {
  box-shadow: var(--ap-shadow-md);
}

/* Best Answer */
#anspress .best-answer .ap-cell-inner {
  border-color: var(--ap-secondary) !important;
  background: #ECFDF5 !important;
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3) !important;
}

#anspress .best-answer .ap-q-metas {
  background: var(--ap-secondary) !important;
  color: white !important;
  border-radius: 1rem 1rem 0 0 !important;
}

/* Vote Buttons */
#anspress .ap-vote a {
  background: white !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: 0.75rem !important;
  transition: all var(--ap-transition);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: none !important;
}

#anspress .ap-vote a:hover:not(.disable) {
  background: var(--ap-primary) !important;
  color: white !important;
  border-color: var(--ap-primary) !important;
  transform: scale(1.1);
}

#anspress .ap-vote a.voted,
#anspress .ap-vote a.active {
  background: var(--ap-primary) !important;
  color: white !important;
  border-color: var(--ap-primary) !important;
}

/* Search Bar */
#anspress #ap-search-form .ap-search-input {
  border-radius: 1rem !important;
  padding: 0.75rem 1rem !important;
  border: 2px solid var(--ap-border) !important;
  font-size: 1.125rem;
}

#anspress #ap-search-form .ap-search-input:focus {
  border-color: var(--ap-primary) !important;
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3) !important;
}

/* List Header */
#anspress .ap-list-head {
  background: white !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: 1rem !important;
  padding: 1.5rem !important;
  margin-bottom: 1.5rem;
  box-shadow: var(--ap-shadow-sm);
}

/* Pagination */
#anspress .ap-pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

#anspress .ap-pagination span,
#anspress .ap-pagination a {
  padding: 0.5rem 1rem !important;
  border: 1px solid var(--ap-border) !important;
  border-radius: 0.75rem !important;
  transition: all var(--ap-transition);
  font-weight: 500;
  text-decoration: none;
  color: var(--ap-text-primary);
  background: white !important;
}

#anspress .ap-pagination a:hover {
  background: var(--ap-primary) !important;
  color: white !important;
  border-color: var(--ap-primary) !important;
  transform: translateY(-2px);
  box-shadow: var(--ap-shadow-sm);
}

#anspress .ap-pagination span {
  background: var(--ap-primary) !important;
  color: white !important;
  border-color: var(--ap-primary) !important;
}

/* List Counts */
#anspress .ap-list-counts {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Question Summary */
#anspress .ap-questions-summery {
  flex: 1;
  margin-left: 0;
  margin-right: 0;
}

/* Headings */
#anspress h1,
#anspress h2,
#anspress h3 {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700;
  line-height: 1.25;
}

/* Responsive Design */
@media (max-width: 768px) {
  #anspress .ap-questions-item {
    flex-direction: column;
    padding: 1rem !important;
  }
  
  #anspress .ap-list-counts {
    flex-direction: row;
    gap: 0.75rem;
  }
  
  #anspress .ap-questions-count {
    min-width: 50px;
  }
  
  #anspress .ap-questions-summery {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Smooth Animations */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

