/* Reset */
body,
h1,
p,
label,
input,
select,
button {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Container */
.submit-ad-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    font-family: "Segoe UI", sans-serif;
    color: #333;
}

/* Header */
.submit-ad-container h1 {
    font-size: 28px;
    margin-bottom: 12px;
    text-align: center;
    color: #222;
}

.submit-ad-container p {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: center;
    color: #555;
}

/* Form Styling */
form#adForm label {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
    font-size: 16px;
}

form#adForm input,
form#adForm select {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    background: #f9f9f9;
    transition: border-color 0.3s ease;
}

form#adForm input:focus,
form#adForm select:focus {
    outline: none;
    border-color: #4b9cdb;
    background: #fff;
}

/* Button Styling */
form#adForm button[type="submit"],
form#adForm button[type="button"] {
    margin-top: 20px;
    padding: 12px;
    font-size: 16px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    font-weight: bold;
}

form#adForm button[type="submit"]:hover {
    background-color: #218838;
}

form#adForm button[type="button"] {
    margin-top: 10px;
    background-color: #007bff;
}

form#adForm button[type="button"]:hover {
    background-color: #0069d9;
}

/* Status Message */
.submit-status {
    margin-top: 20px;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    border-radius: 8px;
    display: none;
}

/* Success / Error Colors */
.submit-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.submit-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media screen and (max-width: 600px) {

    form#adForm button {
        font-size: 16px;
    }
}


.ad-preview-img {
    margin-top: 10px;
    max-width: 100%;
    max-height: 180px;
    border: 1px solid #ccc;
    border-radius: 6px;
    object-fit: contain;
    background: #f8f8f8;
}


.local-ad-box {
  border: 1px solid #ccc;
  border-radius: 8px;
  margin: 10px auto;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #f9f9f9;
  max-width: 728px;
  transition: box-shadow 0.2s ease;
}

.local-ad-box:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.local-ad-box .ad-img {
  height: 90px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}

.local-ad-box .ad-content {
  flex-grow: 1;
}

.local-ad-box .ad-content strong {
  font-size: 18px;
  color: #333;
}

.local-ad-box .ad-content p {
  font-size: 14px;
  color: #555;
  margin: 4px 0;
}

.local-ad-box .ad-content small {
  color: #777;
  font-size: 12px;
}

/* Optional: Styling for text-only version */
.local-ad-box .text-only {
  text-align: left;
  padding: 5px 0;
}

/* 🔁 Responsive Design */
@media screen and (max-width: 600px) {
  .local-ad-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px;
  }

  .local-ad-box .ad-img {
    width: 100%;
    max-height: 120px;
  }

  .local-ad-box .ad-content strong {
    font-size: 16px;
  }

  .local-ad-box .ad-content p {
    font-size: 13px;
  }
}

.img-label {
  font-size: 11px;
  color: gray;
  margin-top: 4px;
}


.share-btn {
  margin: 15px 0px 5px 15px;
  padding: 10px 15px 0px 15px;
  background: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 6px;
}




/*For image+text layout, use renderLocalAd(ad, "desktop" or "mobile", false)

For text-only layout, use renderLocalAd(ad, "mobile", true)
*/