/* Native In-Feed Advertisement Styles */

/* Ad Post Container */
.nextdoor-ad-post {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.nextdoor-ad-post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Sponsored Label */
.nextdoor-ad-label {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
    border-radius: 20px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.nextdoor-ad-label i {
    margin-right: 6px;
    font-size: 12px;
}

/* Ad Content */
.nextdoor-ad-content {
    cursor: pointer;
    padding: 0;
}

.nextdoor-ad-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background: #f9fafb;
}

.nextdoor-ad-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.nextdoor-ad-body {
    padding: 20px;
}

.nextdoor-ad-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.nextdoor-ad-description {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

/* CTA Button */
.nextdoor-ad-cta {
    margin-top: 16px;
}

.nextdoor-ad-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
}

.nextdoor-ad-button:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.nextdoor-ad-button i {
    font-size: 13px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nextdoor-ad-image {
        max-height: 250px;
    }

    .nextdoor-ad-body {
        padding: 16px;
    }

    .nextdoor-ad-title {
        font-size: 18px;
    }

    .nextdoor-ad-description {
        font-size: 14px;
    }

    .nextdoor-ad-button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Ad Management Dashboard Styles */
.ad-dashboard {
    padding: 20px;
}

.ad-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ad-stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.ad-stat-label {
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.ad-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.ad-stat-change {
    font-size: 13px;
    margin-top: 8px;
}

.ad-stat-change.positive {
    color: #10b981;
}

.ad-stat-change.negative {
    color: #ef4444;
}

/* Ad List Table */
.ad-list-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.ad-list-table table {
    width: 100%;
    border-collapse: collapse;
}

.ad-list-table th {
    background: #f9fafb;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.ad-list-table td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.ad-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ad-status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.ad-status-badge.pending {
    background: #fed7aa;
    color: #92400e;
}

.ad-status-badge.paused {
    background: #e5e7eb;
    color: #374151;
}

.ad-status-badge.expired {
    background: #fee2e2;
    color: #991b1b;
}

/* Ad Actions */
.ad-actions {
    display: flex;
    gap: 8px;
}

.ad-action-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ad-action-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.ad-action-btn.primary {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.ad-action-btn.primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.ad-action-btn.danger {
    color: #ef4444;
    border-color: #fecaca;
}

.ad-action-btn.danger:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

/* Ad Form Styles */
.ad-form-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.ad-form-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
}

.ad-form-group {
    margin-bottom: 20px;
}

.ad-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.ad-form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
}

.ad-form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ad-form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    min-height: 100px;
    resize: vertical;
}

.ad-form-helper {
    font-size: 13px;
    color: #6b7280;
    margin-top: 6px;
}

/* Image Upload Area */
.ad-image-upload {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ad-image-upload:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.ad-image-upload i {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 12px;
}

.ad-image-preview {
    max-width: 100%;
    max-height: 300px;
    margin-top: 16px;
    border-radius: 8px;
}

/* Campaign Duration Styles */
.campaign-duration {
    line-height: 1.6;
}

.campaign-duration small {
    white-space: nowrap;
}

.duration-remaining {
    margin-top: 4px;
    font-weight: 500;
}

/* Website Badge Styles */
.website-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.website-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.website-badge.za {
    background: #dbeafe;
    color: #1e40af;
}

.website-badge.jl {
    background: #dcfce7;
    color: #166534;
}

.website-badge.ss {
    background: #fef3c7;
    color: #92400e;
}

.website-badge.ds {
    background: #ede9fe;
    color: #5b21b6;
}

/* Mobile responsive for new columns */
@media (max-width: 992px) {
    .ad-list-table th:nth-child(3),
    .ad-list-table td:nth-child(3),
    .ad-list-table th:nth-child(5),
    .ad-list-table td:nth-child(5) {
        display: none;
    }
}

@media (max-width: 768px) {
    .website-badges {
        flex-direction: column;
        gap: 2px;
    }

    .campaign-duration small {
        font-size: 11px;
    }
}