/* ==========================================
   COMMUNITY PLUGIN STYLES
   ========================================== */

.cp-wrapper {
  font-family: "Inter", Sans-serif;
}

/* Header */
.cp-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 25px;
}

.cp-submit-btn {
  background: #fff;
  color: #f97415;
  text-transform: uppercase;
  font-family: "Bebas Neue", Sans-serif;
  letter-spacing:2px;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.2s ease;
}

.cp-submit-btn:hover {
  background: #c44d00;
  transform: translateY(-1px);
}

/* Feed */
.cp-feed {
 display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 25px;
}

/* Card */
.cp-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  position: relative;
}

.cp-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Card Header */
.cp-card-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
}

.cp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #e85d04;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cp-avatar-initial {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.cp-author-info {
  display: flex;
  flex-direction: column;
}

.cp-author-name {
  font-weight: 700;
  font-size: 15px;
  color: #1a1a1a;
  line-height: 1.3;
}

.cp-author-location {
  display: inline-block;
  background: #1877f2;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

/* Card Image */
.cp-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #1a1a1a;
}

.cp-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cp-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
}

.cp-no-image span {
  font-size: 48px;
  opacity: 0.3;
}

/* Actions Bar */
.cp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
}

.cp-actions-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cp-like-btn,
.cp-comment-toggle-btn,
.cp-share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.cp-like-btn:hover,
.cp-comment-toggle-btn:hover,
.cp-share-btn:hover {
  background: #f5f5f5;
}

.cp-like-btn.liked {
  color: #e85d04;
}

.cp-like-btn.liked svg {
  fill: #e85d04;
}

.cp-like-btn svg,
.cp-comment-toggle-btn svg,
.cp-share-btn svg {
  transition: transform 0.2s ease;
}

.cp-like-btn:hover svg {
  transform: scale(1.2);
}

.cp-like-count,
.cp-comment-count {
  font-weight: 600;
}

/* Card Content */
.cp-card-content {
  padding: 10px 16px 16px;
  font-size: 14px;
  color: #333;
  line-height: 1.6;
}

.cp-content-author {
  font-weight: 700;
  margin-right: 6px;
  color: #1a1a1a;
}

/* Comments Section */
.cp-comments-section {
  border-top: 1px solid #f0f0f0;
  padding: 14px 16px;
  background: #fafafa;
}

.cp-single-comment {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #eee;
}

.cp-single-comment strong {
  font-size: 13px;
  color: #1a1a1a;
  display: block;
  margin-bottom: 4px;
}

.cp-single-comment p {
  font-size: 13px;
  color: #555;
  margin: 0;
}

.cp-add-comment {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.cp-add-comment input,
.cp-add-comment textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13px;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.cp-add-comment input:focus,
.cp-add-comment textarea:focus {
  outline: none;
  border-color: #e85d04;
}

.cp-submit-comment {
  align-self: flex-end;
  background: #e85d04;
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.cp-submit-comment:hover {
  background: #c44d00;
}

/* Share Modal */
.cp-share-modal {
  position: absolute;
  bottom: 60px;
  right: 10px;
  z-index: 100;
}

.cp-share-modal-inner {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  padding: 20px;
  min-width: 220px;
}

.cp-share-modal-inner h4 {
  margin: 0 0 14px;
  font-size: 15px;
  color: #1a1a1a;
  text-align: center;
}

.cp-share-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cp-share-options a,
.cp-copy-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
}

.cp-share-facebook {
  background: #e8f0fe;
  color: #1877f2;
}

.cp-share-twitter {
  background: #e8f5fd;
  color: #1da1f2;
}

.cp-share-whatsapp {
  background: #e8f8f0;
  color: #25d366;
}

.cp-share-pinterest {
  background: #fde8e8;
  color: #e60023;
}

.cp-copy-link {
  background: #f0f0f0;
  color: #333;
}

.cp-share-options a:hover,
.cp-copy-link:hover {
  opacity: 0.85;
}

.cp-share-close {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: #888;
  transition: all 0.2s;
}

.cp-share-close:hover {
  background: #f5f5f5;
}

/* ==========================================
   SUBMISSION MODAL
   ========================================== */
.cp-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  box-sizing: border-box;
  backdrop-filter: blur(3px);
}

.cp-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: cp-modal-in 0.3s ease;
}

@keyframes cp-modal-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.cp-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #1a1a1a;
}

.cp-modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #888;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.cp-modal-close:hover {
  background: #f0f0f0;
}

.cp-modal-body {
  padding: 24px;
}

/* Form Groups */
.cp-form-group {
  margin-bottom: 18px;
}

.cp-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}

.cp-form-group label span {
  color: #e85d04;
}

.cp-form-group input[type="text"],
.cp-form-group input[type="email"],
.cp-form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  box-sizing: border-box;
}

.cp-form-group input:focus,
.cp-form-group textarea:focus {
  outline: none;
  border-color: #e85d04;
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.1);
}

.cp-form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* File Upload */
.cp-file-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cp-file-upload input[type="file"] {
  display: none;
}

.cp-file-label {
  background: #f5f5f5;
  border: 1.5px dashed #ccc;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  transition: all 0.2s;
}

.cp-file-label:hover {
  border-color: #e85d04;
  color: #e85d04;
  background: #fff5f0;
}

#cp-file-name,
#cp-avatar-name {
  font-size: 12px;
  color: #888;
}

#cp-image-preview,
#cp-avatar-preview {
  margin-top: 10px;
}

#cp-image-preview img,
#cp-avatar-preview img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  border: 2px solid #eee;
}

/* Form Actions */
.cp-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.cp-form-submit {
  flex: 1;
  background: #e85d04;
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
}

.cp-form-submit:hover {
  background: #c44d00;
  transform: translateY(-1px);
}

.cp-form-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.cp-form-cancel {
  padding: 13px 24px;
  border: 1.5px solid #ddd;
  border-radius: 25px;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  transition: all 0.2s;
}

.cp-form-cancel:hover {
  border-color: #999;
  color: #333;
}

/* Success Message */
.cp-success-msg {
  text-align: center;
  padding: 30px 20px;
}

.cp-success-msg span {
  font-size: 48px;
  display: block;
  margin-bottom: 10px;
}

.cp-success-msg h4 {
  font-size: 20px;
  color: #1a1a1a;
  margin: 0 0 8px;
}

.cp-success-msg p {
  color: #666;
  font-size: 14px;
}

/* No Posts */
.cp-no-posts {
  text-align: center;
  color: #888;
  font-size: 16px;
  padding: 40px;
}

/* Loading */
.cp-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Copied notification */
.cp-copied-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 999999;
  animation: toast-in 0.3s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    bottom: 10px;
  }
  to {
    opacity: 1;
    bottom: 30px;
  }
}

/* Responsive */
@media (max-width: 480px) {
  .cp-wrapper {
    padding: 10px;
  }
  .cp-modal {
    border-radius: 12px;
  }
  .cp-modal-body {
    padding: 16px;
  }
}
