/* E-Library LMS Pro - Public Styles
 * Modern, responsive styling for the library management system
 */

:root {
  --lms-primary: #4a90e2;
  --lms-secondary: #3d74ba;
  --lms-accent: #f5a623;
  --lms-success: #27ae60;
  --lms-danger: #e74c3c;
  --lms-warning: #f39c12;
  --lms-info: #3498db;
  --lms-light: #ecf0f1;
  --lms-dark: #2c3e50;
  --lms-gray: #95a5a6;
  --lms-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --lms-hover-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  --lms-radius: 8px;
  --lms-font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --lms-transition: all 0.3s ease;
}

/* General Layout */
.lms-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  font-family: var(--lms-font-main);
  color: var(--lms-dark);
}

.lms-heading {
  font-size: 28px;
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--lms-dark);
  border-bottom: 2px solid var(--lms-primary);
  padding-bottom: 10px;
}

.lms-subheading {
  font-size: 22px;
  margin-bottom: 15px;
  font-weight: 500;
  color: var(--lms-dark);
}

/* Buttons */
.lms-btn {
  display: inline-block;
  padding: 12px 20px;
  background-color: var(--lms-primary);
  color: white;
  border: none;
  border-radius: var(--lms-radius);
  cursor: pointer;
  transition: var(--lms-transition);
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  font-size: 14px;
  line-height: 1;
}

.lms-btn:hover {
  background-color: var(--lms-secondary);
  box-shadow: var(--lms-hover-shadow);
  transform: translateY(-2px);
  color: white;
}

.lms-btn-small {
  padding: 8px 15px;
  font-size: 13px;
}

.lms-btn-large {
  padding: 15px 25px;
  font-size: 16px;
}

.lms-btn-secondary {
  background-color: var(--lms-secondary);
}

.lms-btn-accent {
  background-color: var(--lms-accent);
}

.lms-btn-success {
  background-color: var(--lms-success);
}

.lms-btn-danger {
  background-color: var(--lms-danger);
}

.lms-btn-outline {
  background-color: transparent;
  border: 2px solid var(--lms-primary);
  color: var(--lms-primary);
}

.lms-btn-outline:hover {
  background-color: var(--lms-primary);
  color: white;
}

/* Cards */
.lms-card {
  background-color: white;
  border-radius: var(--lms-radius);
  box-shadow: var(--lms-shadow);
  margin-bottom: 20px;
  overflow: hidden;
  transition: var(--lms-transition);
}

.lms-card:hover {
  box-shadow: var(--lms-hover-shadow);
  transform: translateY(-5px);
}

.lms-card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--lms-light);
  background-color: #f9f9f9;
}

.lms-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.lms-card-body {
  padding: 20px;
}

.lms-card-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--lms-light);
  background-color: #f9f9f9;
}

/* Book Catalog - Library Display */
.lms-bookshelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px 0;
  background-color: #f5f5f5;
  border-radius: var(--lms-radius);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
  position: relative;
  margin-bottom: 40px;
}

.lms-bookshelf::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 15px;
  background-color: #d9b38c;
  border-radius: 0 0 var(--lms-radius) var(--lms-radius);
  z-index: 1;
}

.lms-book {
  width: 160px;
  height: 240px;
  position: relative;
  perspective: 1000px;
  margin-bottom: 20px;
}

.lms-book-inner {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  border-radius: 4px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

.lms-book:hover .lms-book-inner {
  transform: rotateY(30deg);
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
}

.lms-book-cover {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 4px;
  background-color: var(--lms-primary);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 15px;
  text-align: center;
  color: white;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.lms-book-spine {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 100%;
  background-color: var(--lms-secondary);
  transform: rotateY(90deg);
  transform-origin: left;
  z-index: 2;
  border-radius: 2px 0 0 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 10px 2px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.lms-book-title {
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
  line-height: 1.3;
  overflow: hidden;
  max-height: 56px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lms-book-author {
  font-size: 12px;
  font-weight: 400;
  margin-top: 5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.lms-book-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--lms-accent);
  color: white;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 0 4px 0 4px;
  z-index: 3;
}

.lms-book-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 4px;
  z-index: 4;
}

.lms-book:hover .lms-book-overlay {
  opacity: 1;
}

.lms-book-actions {
  display: flex;
  gap: 5px;
}

.lms-book-btn {
  padding: 6px 10px;
  font-size: 12px;
  background-color: var(--lms-primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lms-book-btn:hover {
  background-color: var(--lms-secondary);
}

/* Book Categories Filter */
.lms-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.lms-category-tag {
  padding: 8px 16px;
  background-color: #f1f1f1;
  color: var(--lms-dark);
  border-radius: 30px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lms-category-tag:hover,
.lms-category-tag.active {
  background-color: var(--lms-primary);
  color: white;
}

/* Search Form */
.lms-search-form {
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  background-color: white;
  padding: 20px;
  border-radius: var(--lms-radius);
  box-shadow: var(--lms-shadow);
}

.lms-search-field {
  flex: 1;
  min-width: 250px;
}

.lms-search-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: var(--lms-radius);
  font-size: 14px;
  transition: all 0.2s ease;
}

.lms-search-input:focus {
  border-color: var(--lms-primary);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
  outline: none;
}

.lms-search-submit {
  flex: 0 0 auto;
}

/* Member Dashboard */
.lms-dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
  justify-content: space-between;
}

.lms-dashboard-sidebar {
  flex: 0 0 250px;
  position: sticky;
  top: 20px;
  align-self: flex-start;
}

.lms-dashboard-main {
  flex: 1;
  min-width: 300px;
  max-width: calc(100% - 270px);
}

.lms-dashboard-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: white;
  border-radius: var(--lms-radius);
  box-shadow: var(--lms-shadow);
  overflow: hidden;
}

.lms-dashboard-menu-item {
  border-bottom: 1px solid var(--lms-light);
}

.lms-dashboard-menu-item:last-child {
  border-bottom: none;
}

.lms-dashboard-menu-link {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: var(--lms-dark);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.lms-dashboard-menu-link:hover,
.lms-dashboard-menu-link.active {
  background-color: var(--lms-primary);
  color: white;
}

.lms-dashboard-menu-link i {
  margin-right: 10px;
  font-size: 18px;
}

.lms-dashboard-user {
  padding: 20px;
  text-align: center;
  background-color: white;
  margin-bottom: 15px;
  border-radius: var(--lms-radius);
  box-shadow: var(--lms-shadow);
}

.lms-dashboard-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 15px;
  object-fit: cover;
  border: 3px solid var(--lms-light);
  box-shadow: var(--lms-shadow);
}

.lms-dashboard-username {
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 18px;
}

.lms-dashboard-role {
  color: var(--lms-gray);
  font-size: 14px;
  margin-bottom: 10px;
}

.lms-dashboard-status {
  margin-top: 10px;
}

.lms-dashboard-content {
  background-color: white;
  border-radius: var(--lms-radius);
  box-shadow: var(--lms-shadow);
  padding: 25px;
  margin-bottom: 20px;
}

.lms-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.lms-stat-card {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: var(--lms-radius);
  padding: 15px;
  box-shadow: var(--lms-shadow);
  transition: var(--lms-transition);
}

.lms-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--lms-hover-shadow);
}

.lms-stat-icon {
  font-size: 24px;
  margin-right: 15px;
  background-color: var(--lms-light);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.lms-stat-content {
  flex: 1;
}

.lms-stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--lms-primary);
  margin-bottom: 5px;
}

.lms-stat-label {
  font-size: 14px;
  color: var(--lms-gray);
}

.lms-dashboard-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Login Form */
.lms-login-container {
  max-width: 400px;
  margin: 0 auto;
}

.lms-login-form {
  background-color: white;
  padding: 30px;
  border-radius: var(--lms-radius);
  box-shadow: var(--lms-shadow);
}

.lms-login-heading {
  text-align: center;
  margin-bottom: 20px;
  font-size: 24px;
  color: var(--lms-dark);
}

.lms-form-group {
  margin-bottom: 20px;
}

.lms-form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--lms-dark);
}

.lms-form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: var(--lms-radius);
  font-size: 14px;
  transition: all 0.2s ease;
}

.lms-form-input:focus {
  border-color: var(--lms-primary);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
  outline: none;
}

.lms-form-actions {
  margin-top: 25px;
}

.lms-form-submit {
  width: 100%;
}

.lms-form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--lms-gray);
}

.lms-form-footer a {
  color: var(--lms-primary);
  text-decoration: none;
}

.lms-form-footer a:hover {
  text-decoration: underline;
}

/* Message Boxes */
.lms-message {
  padding: 15px;
  border-radius: var(--lms-radius);
  margin-bottom: 20px;
  border-left: 4px solid transparent;
}

.lms-message-success {
  background-color: #d4edda;
  border-color: var(--lms-success);
  color: #155724;
}

.lms-message-error {
  background-color: #f8d7da;
  border-color: var(--lms-danger);
  color: #721c24;
}

.lms-message-warning {
  background-color: #fff3cd;
  border-color: var(--lms-warning);
  color: #856404;
}

.lms-message-info {
  background-color: #d1ecf1;
  border-color: var(--lms-info);
  color: #0c5460;
}

/* Responsive design */
@media (max-width: 768px) {
  .lms-dashboard {
    flex-direction: column;
  }
  
  .lms-dashboard-sidebar {
    flex: 0 0 100%;
    position: static;
  }
  
  .lms-dashboard-main {
    max-width: 100%;
  }
  
  .lms-dashboard-stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  
  .lms-book {
    width: 140px;
    height: 210px;
  }
  
  .lms-search-form {
    flex-direction: column;
  }
  
  .lms-heading {
    font-size: 24px;
  }
  
  .lms-subheading {
    font-size: 20px;
  }
}

@media (max-width: 576px) {
  .lms-book {
    width: 120px;
    height: 180px;
  }
  
  .lms-book-title {
    font-size: 12px;
    max-height: 48px;
  }
  
  .lms-book-author {
    font-size: 10px;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lms-fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.lms-slide-up {
  animation: slideUp 0.5s ease;
}

/* Loader */
.lms-loader {
  display: inline-block;
  width: 30px;
  height: 30px;
  border: 3px solid rgba(74, 144, 226, 0.3);
  border-radius: 50%;
  border-top-color: var(--lms-primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.lms-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Pagination Styles */
.lms-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: var(--lms-radius);
  box-shadow: var(--lms-shadow);
}

.lms-pagination-info {
  margin: 0 15px;
  font-size: 14px;
  color: var(--lms-dark);
}

.lms-load-more-container {
  text-align: center;
  margin: 30px 0;
}

.lms-load-more-btn {
  padding: 12px 30px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.lms-load-more-btn:disabled {
  background-color: var(--lms-gray);
  cursor: not-allowed;
  opacity: 0.7;
  transform: none !important;
  box-shadow: none !important;
}

.lms-lazy-load-trigger {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  margin: 20px 0;
  min-height: 100px;
}

.lms-loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lms-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--lms-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.lms-spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
}

.lms-text-center {
  text-align: center;
}

.lms-text-danger {
  color: var(--lms-danger);
}

.lms-text-muted {
  color: var(--lms-gray);
  font-size: 0.9em;
}

/* Loading overlay for AJAX requests */
.lms-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  border-radius: var(--lms-radius);
}

/* Book List and Status Badges */
.lms-book-list-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.lms-book-list-cover {
  width: 50px;
  height: 75px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--lms-shadow);
}

.lms-book-list-cover-placeholder {
  width: 50px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--lms-primary);
  color: white;
  font-weight: bold;
  font-size: 18px;
  border-radius: 4px;
}

.lms-book-list-details {
  flex: 1;
}

.lms-book-list-title {
  margin: 0 0 5px 0;
  font-size: 16px;
  font-weight: 600;
}

.lms-book-list-author {
  font-size: 14px;
  color: var(--lms-gray);
  margin-bottom: 3px;
}

.lms-book-list-isbn {
  font-size: 12px;
  color: var(--lms-gray);
}

.lms-status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  min-width: 80px;
}

.lms-status-success {
  background-color: rgba(39, 174, 96, 0.2);
  color: var(--lms-success);
  border: 1px solid var(--lms-success);
}

.lms-status-danger {
  background-color: rgba(231, 76, 60, 0.2);
  color: var(--lms-danger);
  border: 1px solid var(--lms-danger);
}

.lms-status-warning {
  background-color: rgba(243, 156, 18, 0.2);
  color: var(--lms-warning);
  border: 1px solid var(--lms-warning);
}

.lms-status-info {
  background-color: rgba(52, 152, 219, 0.2);
  color: var(--lms-info);
  border: 1px solid var(--lms-info);
}

.lms-fine-amount {
  margin-top: 5px;
  font-weight: 600;
}

.lms-badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 5px;
}

.lms-badge-success {
  background-color: var(--lms-success);
  color: white;
}

.lms-badge-danger {
  background-color: var(--lms-danger);
  color: white;
}

.lms-badge-warning {
  background-color: var(--lms-warning);
  color: white;
}

.lms-badge-info {
  background-color: var(--lms-info);
  color: white;
}

/* Tables */
.lms-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
}

.lms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.lms-table th {
  background-color: #f9f9f9;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--lms-light);
}

.lms-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--lms-light);
  vertical-align: middle;
}

.lms-table tr:last-child td {
  border-bottom: none;
}

.lms-table tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
} 