/* ===================================
   Apple Liquid Glass Effect - Bootstrap 3 Compatible
   =================================== */

/* Glass Card Base */
.glass-card {
  background: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Glass Input Fields */
.glass-input {
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.95) !important;
  padding: 10px 16px;
  transition: all 0.3s ease;
}

.glass-input:focus {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1) !important;
  outline: none;
}

.glass-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Input Group Addon */
.glass-input-addon {
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px 0 0 12px;
  color: rgba(255, 255, 255, 0.8);
}

.input-group .glass-input {
  border-radius: 0 12px 12px 0;
}

/* Glass Modal */
.glass-modal .modal-content {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.glass-modal .modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px 20px 0 0;
}

.glass-modal .modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0 0 20px 20px;
}

.glass-modal .modal-title {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

/* Glass Alert */
.glass-alert {
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.9);
}

/* Page Header */
.page-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 30px;
  padding-bottom: 20px;
}

.page-title {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  font-size: 32px;
  margin: 0;
}

/* Search and Filter Section */
.search-filter-section {
  margin-bottom: 30px;
  padding: 20px;
}

/* Services Grid */
.services-grid {
  margin: 0 -10px;
}

.service-card-wrapper {
  padding: 10px;
  margin-bottom: 20px;
}

/* Service Card */
.service-card {
  height: 100%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.service-card .panel-body {
  padding: 20px;
}

/* Service Header */
.service-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.service-icon-wrapper {
  perspective: 1000px;
}

.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-icon {
  transform: rotateY(180deg) rotateX(10deg);
}

.service-icon i {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.9);
}

/* Favorite Button */
.favorite-btn {
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
}

.favorite-btn:hover,
.favorite-btn.active {
  color: #ff4757;
}

.favorite-btn.active i:before {
  content: "\f004"; /* fa-heart */
}

/* Service Name */
.service-name {
  color: rgba(255, 255, 255, 0.95);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px 0;
  line-height: 1.4;
  height: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Service Stats */
.service-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.rate-value {
  color: #4ade80;
}

/* Service Description */
.service-description {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 12px 0;
  line-height: 1.5;
  height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Select Service Button */
.select-service-btn {
  background: rgba(59, 130, 246, 0.2) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  border-radius: 10px;
  padding: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.select-service-btn:hover {
  background: rgba(59, 130, 246, 0.3) !important;
  border-color: rgba(59, 130, 246, 0.6) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Form Spacing */
.form-group {
  margin-bottom: 20px;
}

.control-label {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin-bottom: 8px;
}

.help-block {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin-top: 6px;
}

/* Buttons */
.btn {
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background: rgba(59, 130, 246, 0.3) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.5) !important;
  color: white !important;
}

.btn-primary:hover {
  background: rgba(59, 130, 246, 0.4) !important;
  border-color: rgba(59, 130, 246, 0.7) !important;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-default {
  background: rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

.btn-default:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Checkbox & Radio */
.checkbox label,
.radio label {
  color: rgba(255, 255, 255, 0.9);
}

/* Alert Overrides */
.alert-success {
  background: rgba(74, 222, 128, 0.15) !important;
  border-color: rgba(74, 222, 128, 0.3) !important;
  color: rgba(255, 255, 255, 0.95);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: rgba(255, 255, 255, 0.95);
}

.alert-info {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  color: rgba(255, 255, 255, 0.95);
}

/* Well Override */
.well {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Panel Override */
.panel {
  background: transparent;
  border: none;
  box-shadow: none;
}

.panel-default {
  border: none;
}

/* Text Colors */
.text-danger {
  color: #ef4444 !important;
}

/* Responsive */
@media (max-width: 768px) {
  .service-card-wrapper {
    padding: 8px;
  }

  .page-title {
    font-size: 24px;
  }

  .service-stats {
    flex-direction: column;
    gap: 8px;
  }

  .stat-item {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
  }
}

/* Dark Mode Support */
body {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  color: rgba(255, 255, 255, 0.9);
}

/* Hidden State */
.service-card-wrapper[style*="display: none"],
.service-card-wrapper.hidden {
  display: none !important;
}

/* Loading State */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.6);
}

.empty-state i {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.3;
}

/* Tooltip Override */
.tooltip-inner {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}
