/*
Theme Name: Astra Child
Template: astra
*/

.full-width {
  width: 100vw;
  max-width: 100%;
  margin-left: calc(-50vw + 50%);
  background: #f0f2f5;
  padding: 40px 0;
}

/* ===== Create Post Area (Top Section) ===== */
.create-post-area {
  width: 100%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 20px 30px;
  margin: 0 auto 40px;
  max-width: 900px;
}

.create-post-form {
  width: 100%;
}

.create-post-form .form-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.create-post-form .form-header img {
  border-radius: 50%;
  width: 50px;
  height: 50px;
}

.create-post-form textarea {
  flex: 1;
  border: none;
  background: #f0f2f5;
  border-radius: 18px;
  padding: 12px 16px;
  resize: none;
  font-size: 1.1rem;
  line-height: 1.4;
  min-height: 90px;
  color: #1c1e21;
}

.create-post-form textarea:focus {
  outline: none;
  background: #e8eaed;
}

/* Form Options (bottom row) */
.create-post-form .form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.upload-label {
  background: #f0f2f5;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.upload-label input {
  display: none;
}

.create-post-form select {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 0.95rem;
}

.create-post-form .post-btn {
  background-color: #0866ff;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.create-post-form .post-btn:hover {
  background-color: #055be2;
}

/* ===== Preview Styling ===== */
#previewBox {
  margin-top: 20px;
  padding: 15px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Keep feed centered */
.feed-section {
  display: flex;
  justify-content: center;
}

/* === CUSTOM WIDTH FIX === */
/* Widen the feed and posts */
.fb-feed {
  width: 100%;
  max-width: 900px; /* make this 1000px or 1200px for even wider */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 20px;
}

/* Each post */
.fb-post {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 20px;
}

/* Header (avatar + name) */
.fb-post-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.fb-avatar img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.fb-author-info {
  margin-left: 10px;
  display: flex;
  flex-direction: column;
}

.fb-author-name {
  font-weight: bold;
  font-size: 0.95rem;
}

.fb-post-date {
  color: #777;
  font-size: 0.8rem;
}

/* Post text */
.fb-post-text {
  margin-top: 5px;
  margin-bottom: 10px;
  color: #1c1e21;
  line-height: 1.5;
}

/* Media */
.fb-post-media {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

.fb-post-media img,
.fb-post-media video {
  border-radius: 8px;
  max-height: 250px;
  width: auto;
  max-width: 48%;
  object-fit: cover;
}

/* Layout variations */
.layout-single .fb-post-media img,
.layout-single .fb-post-media video {
  max-width: 100%;
  max-height: 400px;
}

.layout-side .fb-post-media img,
.layout-side .fb-post-media video {
  max-width: 48%;
}

/* Create post form */
.create-post-form {
  max-width: 600px;
  margin: 0 auto 30px;
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.create-post-form textarea {
  width: 100%;
  background: #f0f2f5;
  border: none;
  border-radius: 8px;
  padding: 10px;
  min-height: 80px;
  resize: none;
  font-size: 1rem;
  margin-bottom: 10px;
}

.create-post-form textarea:focus {
  outline: none;
  background: #e8eaed;
}

.create-post-form input[type="file"],
.create-post-form select {
  width: 100%;
  margin-bottom: 10px;
}

.create-post-form input[type="submit"] {
  background-color: #0866ff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  float: right;
}

.create-post-form input[type="submit"]:hover {
  background-color: #055be2;
}

/* --- Delete Button --- */
.fb-post-actions {
  text-align: right;
  margin-top: 5px;
}

.delete-post-btn {
  background: none;
  border: none;
  color: #e02424;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.delete-post-btn:hover {
  background: #fceaea;
}

/* ===== Create Post Area ===== */
.create-post-area {
  width: 100%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 30px 40px;
  margin: 0 auto 40px;
  max-width: 900px;
}

.form-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #1c1e21;
}

/* Textarea */
#create-post-form textarea,
.create-post-form textarea {
  width: 100%;
  border: none;
  background: #f0f2f5;
  border-radius: 18px;
  padding: 14px 18px;
  resize: none;
  font-size: 1.05rem;
  min-height: 100px;
  color: #1c1e21;
}

.create-post-form textarea:focus {
  outline: none;
  background: #e8eaed;
}

/* Options row */
.create-post-form .form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.upload-label {
  background: #f0f2f5;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  color: #333;
}

.upload-label input {
  display: none;
}

.create-post-form select {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 0.95rem;
}

.post-btn {
  background-color: #0866ff;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

.post-btn:hover {
  background-color: #055be2;
}

/* Preview */
#previewBox {
  margin-top: 20px;
  padding: 15px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.fb-post-media img,
.fb-post-media video {
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  margin-top: 10px;
}

/* === OPTIONAL: FULL-WIDTH LAYOUT === */
/*
.ast-container {
  max-width: 100% !important;
  padding: 0 30px;
}
*/
