/**
 * NWC Member Profiles CSS
 * Main stylesheet for member profile functionality
 */

/* Dashboard Layout */
.nwc-dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.nwc-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.nwc-dashboard-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nwc-dashboard-profile h2 {
  margin: 0;
  padding: 0;
  font-size: 1.5rem;
}

/* Status Indicators */
.nwc-status-active {
  display: inline-block;
  background: #4CAF50;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  font-weight: 500;
}

.nwc-status-inactive {
  display: inline-block;
  background: #F44336;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  margin-right: 1rem;
  font-weight: 500;
}

.nwc-subscribe-button {
  display: inline-block;
  background: #2271b1;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease;
}

.nwc-subscribe-button:hover {
  background: #135e96;
  color: white;
  text-decoration: none;
}

/* Tabs Navigation */
.nwc-tabs-nav {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  border-bottom: 1px solid #eee;
}

.nwc-tabs-nav li {
  margin-right: 0.5rem;
  margin-bottom: 0;
}

.nwc-tabs-nav li a {
  display: block;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  color: #333;
  border: 1px solid transparent;
}

.nwc-tabs-nav li.active a {
  border: 1px solid #eee;
  border-bottom-color: #fff;
  border-radius: 3px 3px 0 0;
  margin-bottom: -1px;
}

.nwc-tab-content {
  display: none;
}

.nwc-tab-content.active {
  display: block;
}

/* Avatar Display */
.nwc-user-avatar {
  border-radius: 50%;
  object-fit: cover;
}

.nwc-avatar-preview {
  margin-bottom: 1rem;
  text-align: center;
}

.nwc-avatar-preview img {
  border-radius: 50%;
  max-width: 150px;
  height: auto;
  border: 3px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nwc-avatar-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  border: 3px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
}

/* Avatar Upload Form */
.nwc-avatar-upload-container {
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.nwc-avatar-form {
  max-width: 400px;
  margin: 0 auto;
}

.nwc-avatar-field {
  margin-bottom: 1rem;
}

.nwc-avatar-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.nwc-avatar-help {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
}

/* AJAX Upload Interface */
.nwc-avatar-upload-area {
  margin-top: 1rem;
}

.nwc-upload-zone {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fafafa;
}

.nwc-upload-zone:hover {
  border-color: #2271b1;
  background: #f0f8ff;
}

.nwc-upload-zone.drag-over {
  border-color: #2271b1;
  background: #e6f3ff;
  transform: scale(1.02);
}

.nwc-upload-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.nwc-upload-text {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #333;
}

.nwc-upload-help {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
}

.nwc-upload-progress {
  margin-top: 1rem;
}

.nwc-progress-bar {
  width: 100%;
  height: 8px;
  background: #f0f0f0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.nwc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2271b1, #135e96);
  width: 0%;
  transition: width 0.3s ease;
}

.nwc-progress-text {
  font-size: 0.85rem;
  color: #666;
  text-align: center;
  display: block;
}

.nwc-avatar-actions {
  margin-top: 1rem;
  text-align: center;
}

.nwc-avatar-actions .button {
  margin: 0 0.25rem;
}

.nwc-delete-avatar {
  background: #dc3545;
  color: white;
  border: none;
}

.nwc-delete-avatar:hover {
  background: #c82333;
  color: white;
}

.nwc-cancel-upload {
  background: #6c757d;
  color: white;
  border: none;
}

.nwc-cancel-upload:hover {
  background: #5a6268;
  color: white;
}

/* Profile Display */
.nwc-user-profile {
  text-align: center;
  margin-bottom: 1.5rem;
}

.nwc-user-profile .nwc-user-avatar {
  margin-bottom: 0.5rem;
}

.nwc-user-profile .nwc-user-name {
  font-weight: 500;
}

.nwc-profile-horizontal {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nwc-name-left .nwc-profile-horizontal {
  flex-direction: row;
}

.nwc-name-right .nwc-profile-horizontal {
  flex-direction: row-reverse;
}

/* Profile Editor */
.nwc-profile-editor {
  margin-bottom: 2rem;
}

.nwc-profile-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eee;
}

.nwc-profile-section:last-child {
  border-bottom: none;
}

.nwc-form-row {
  margin-bottom: 1.5rem;
}

.nwc-form-row label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.nwc-form-row input[type="text"],
.nwc-form-row input[type="email"],
.nwc-form-row input[type="password"],
.nwc-form-row textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 3px;
}

.nwc-form-actions {
  margin-top: 2rem;
}

/* Login Form */
.nwc-login-container {
  max-width: 400px;
  margin: 0 auto;
  padding: 2rem;
  background: #f9f9f9;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nwc-login-container h2 {
  margin-top: 0;
  text-align: center;
  margin-bottom: 1.5rem;
}

.nwc-login-container form {
  margin-bottom: 1rem;
}

.nwc-login-container label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.nwc-login-container input[type="text"],
.nwc-login-container input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 3px;
  margin-bottom: 1rem;
}

.nwc-login-container input[type="submit"] {
  width: 100%;
  padding: 0.75rem;
  background: #2271b1;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 500;
}

.nwc-login-container input[type="submit"]:hover {
  background: #135e96;
}

.nwc-login-links {
  text-align: center;
  margin-top: 1rem;
}

.nwc-login-separator {
  margin: 0 0.5rem;
  color: #999;
}

.nwc-login-subscribe {
  margin-top: 2rem;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.nwc-login-subscribe p {
  margin-bottom: 1rem;
}

/* Welcome Bar */
.nwc-user-welcome {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #f9f9f9;
  border-radius: 3px;
}

.nwc-welcome-text {
  margin-right: auto;
}

.nwc-logout-link,
.nwc-dashboard-link {
  padding: 0.4rem 0.75rem;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.9rem;
}

.nwc-logout-link {
  background: #f0f0f0;
  color: #333;
}

.nwc-dashboard-link {
  background: #2271b1;
  color: white;
}

.nwc-dashboard-link:hover {
  background: #135e96;
  color: white;
  text-decoration: none;
}

/* Messages */
.nwc-message {
  padding: 0.75rem 1rem;
  border-radius: 3px;
  margin-bottom: 1.5rem;
}

.nwc-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.nwc-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.nwc-avatar-message {
  padding: 0.75rem 1rem;
  border-radius: 3px;
  margin-bottom: 1.5rem;
}

.nwc-avatar-success {
  background: #d4edda;
  color: #155724;
}

.nwc-avatar-error {
  background: #f8d7da;
  color: #721c24;
}

/* WooCommerce Account Integration */
.nwc-tab-content .woocommerce-MyAccount-navigation {
  display: none; /* Hide WooCommerce navigation since we have our own tabs */
}

.nwc-tab-content .woocommerce-MyAccount-content {
  padding: 0;
  border: none;
  background: transparent;
}

.nwc-tab-content .woocommerce-MyAccount-content h2,
.nwc-tab-content .woocommerce-MyAccount-content h3 {
  margin-top: 0;
  color: #333;
}

.nwc-tab-content .woocommerce-MyAccount-content .woocommerce-orders-table,
.nwc-tab-content .woocommerce-MyAccount-content .woocommerce-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.nwc-tab-content .woocommerce-MyAccount-content .woocommerce-orders-table th,
.nwc-tab-content .woocommerce-MyAccount-content .woocommerce-table th {
  background: #f8f9fa;
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
}

.nwc-tab-content .woocommerce-MyAccount-content .woocommerce-orders-table td,
.nwc-tab-content .woocommerce-MyAccount-content .woocommerce-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #dee2e6;
  vertical-align: top;
}

.nwc-tab-content .woocommerce-MyAccount-content .button {
  background: #2271b1;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  text-decoration: none;
  display: inline-block;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.nwc-tab-content .woocommerce-MyAccount-content .button:hover {
  background: #135e96;
  color: white;
  text-decoration: none;
}

.nwc-tab-content .woocommerce-MyAccount-content .form-row {
  margin-bottom: 1rem;
}

.nwc-tab-content .woocommerce-MyAccount-content .form-row label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.nwc-tab-content .woocommerce-MyAccount-content .form-row input,
.nwc-tab-content .woocommerce-MyAccount-content .form-row textarea,
.nwc-tab-content .woocommerce-MyAccount-content .form-row select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 0.9rem;
}

.nwc-tab-content .woocommerce-MyAccount-content .form-row input:focus,
.nwc-tab-content .woocommerce-MyAccount-content .form-row textarea:focus,
.nwc-tab-content .woocommerce-MyAccount-content .form-row select:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

/* Account Fallback Styling */
.nwc-account-fallback {
  text-align: center;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 5px;
  border: 1px solid #dee2e6;
}

.nwc-account-fallback h3 {
  color: #6c757d;
  margin-bottom: 1rem;
}

.nwc-account-fallback p {
  color: #6c757d;
  margin-bottom: 0.5rem;
}

/* Comprehensive WooCommerce Account Styling */
.nwc-woocommerce-account {
  padding: 0;
}

.nwc-account-sections {
  display: grid;
  gap: 2rem;
}

.nwc-account-section {
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nwc-account-section h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #333;
  font-size: 1.25rem;
  border-bottom: 2px solid #2271b1;
  padding-bottom: 0.5rem;
}

.nwc-account-section h4 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: #555;
  font-size: 1rem;
}

.nwc-orders-table {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.nwc-orders-table table {
  width: 100%;
  min-width: 600px;
}

.nwc-view-all-orders {
  text-align: center;
  margin-top: 1rem;
}

.nwc-account-info {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
}

.nwc-account-info p {
  margin-bottom: 0.5rem;
}

.nwc-addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.nwc-address-item {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 5px;
  border: 1px solid #e9ecef;
}

.nwc-address-item address {
  font-style: normal;
  line-height: 1.5;
  margin-bottom: 1rem;
  color: #555;
}

.nwc-subscriptions {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.nwc-subscription-item {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 5px;
  border: 1px solid #e9ecef;
}

.nwc-subscription-item p {
  margin-bottom: 0.5rem;
}

.nwc-subscription-item .button {
  margin-top: 0.5rem;
}

/* Listings Card Styling */
.nwc-listings-card {
  background: #fff;
  border: 1px solid #e1e5e9;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.nwc-listings-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.nwc-listings-card-content {
  padding: 2rem;
  text-align: center;
}

.nwc-listings-icon {
  margin-bottom: 1.5rem;
}

.nwc-listings-icon .dashicons {
  font-size: 3rem;
  color: #2271b1;
  width: 3rem;
  height: 3rem;
}

.nwc-listings-card h3 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 1.5rem;
  font-weight: 600;
}

.nwc-listings-card p {
  color: #666;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.nwc-listing-preview {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: left;
}

.nwc-listing-preview h4 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.25rem;
}

.nwc-listing-description {
  color: #666;
  margin-bottom: 1rem;
  font-style: italic;
}

.nwc-listing-address {
  color: #555;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nwc-listing-address .dashicons {
  color: #2271b1;
  font-size: 1rem;
}

.nwc-listing-benefits {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  text-align: left;
}

.nwc-listing-benefits h4 {
  margin: 0 0 1rem 0;
  color: #333;
  font-size: 1.1rem;
}

.nwc-listing-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nwc-listing-benefits li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: #555;
}

.nwc-listing-benefits li:last-child {
  margin-bottom: 0;
}

.nwc-listing-benefits .dashicons {
  color: #28a745;
  font-size: 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
}

.nwc-listings-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.nwc-listings-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  min-width: 180px;
  justify-content: center;
}

.nwc-create-listing-btn,
.nwc-manage-listing-btn {
  background: #2271b1;
  color: #fff;
  border: 2px solid #2271b1;
}

.nwc-create-listing-btn:hover,
.nwc-manage-listing-btn:hover {
  background: #135e96;
  border-color: #135e96;
  color: #fff;
  transform: translateY(-1px);
}

.nwc-view-listing-btn {
  background: #fff;
  color: #2271b1;
  border: 2px solid #2271b1;
}

.nwc-view-listing-btn:hover {
  background: #2271b1;
  color: #fff;
  transform: translateY(-1px);
}

.nwc-listings-actions .dashicons {
  font-size: 1rem;
  width: 1rem;
  height: 1rem;
}

/* Member Info Display Shortcodes */
.member-info-display {
  color: #fff;
  font-size: 1.6rem;
  font-weight: bold;
  text-transform: uppercase;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .nwc-dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .nwc-dashboard-status {
    width: 100%;
    display: flex;
    gap: 0.5rem;
  }
  
  .nwc-tabs-nav {
    flex-wrap: wrap;
  }
  
  .nwc-tabs-nav li {
    margin-right: 0;
    margin-bottom: 0.5rem;
    width: 100%;
  }
  
  .nwc-tabs-nav li a {
    width: 100%;
    text-align: center;
  }
  
  .nwc-user-welcome {
    flex-direction: column;
    text-align: center;
  }
  
  .nwc-welcome-text {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }
  
  .nwc-tab-content .woocommerce-MyAccount-content .woocommerce-orders-table,
  .nwc-tab-content .woocommerce-MyAccount-content .woocommerce-table {
    font-size: 0.85rem;
  }
  
  .nwc-tab-content .woocommerce-MyAccount-content .woocommerce-orders-table th,
  .nwc-tab-content .woocommerce-MyAccount-content .woocommerce-table th,
  .nwc-tab-content .woocommerce-MyAccount-content .woocommerce-orders-table td,
  .nwc-tab-content .woocommerce-MyAccount-content .woocommerce-table td {
    padding: 0.5rem 0.25rem;
  }
  
  .nwc-addresses {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .nwc-account-section {
    padding: 1rem;
  }
  
  .nwc-orders-table table {
    min-width: 500px;
  }
  
  .nwc-listings-card-content {
    padding: 1.5rem;
  }
  
  .nwc-listings-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .nwc-listings-actions .button {
    min-width: 200px;
    width: 100%;
    max-width: 300px;
  }
  
  .nwc-listing-preview,
  .nwc-listing-benefits {
    padding: 1rem;
  }
} 