/* css/create-ad.css - Modern Create Ad Styling */

:root {
    --primary-color: #8b0000;
    --primary-hover: #6b0000;
    --primary-light: #fff5f5;
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #9ca3af;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

/* Navbar Customization for Create Ad Page */
.navbar-full {
    margin-top: 0;
    margin-bottom: 0;
}

.navbar-full .nav-container {
    max-width: 100%;
    padding: 15px 25px;
}

.create-ad-container {
    min-height: calc(100vh - 70px);
    background: var(--bg-light);
    padding: 3rem 1.5rem;
}

.create-ad-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-medium);
    font-size: 1.1rem;
}

/* Form Sections */
.form-section {
    background: var(--white);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-section h2 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--bg-light);
    padding-bottom: 1rem;
    font-weight: 600;
}

.form-section h2 i {
    color: var(--primary-color);
    font-size: 1.1em;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    margin-top: -1rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-dark);
    background: var(--white);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
    font-family: inherit;
    line-height: 1.6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Image Upload */
.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-light);
    margin-bottom: 1.5rem;
}

.image-upload-area:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-medium);
}

.upload-placeholder i {
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.upload-placeholder p {
    font-weight: 600;
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.upload-placeholder span {
    font-size: 0.9rem;
    color: var(--text-light);
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.preview-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-light);
    aspect-ratio: 1;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.preview-item:hover img {
    transform: scale(1.05);
}

.preview-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
}

.preview-remove:hover {
    background: var(--danger-color);
    transform: rotate(90deg);
}

.preview-main-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.form-actions button {
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(139, 0, 0, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(139, 0, 0, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-medium);
    border: 1px solid var(--border-color) !important;
}

.btn-secondary:hover {
    background: var(--bg-light);
    color: var(--text-dark);
    border-color: var(--text-light) !important;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    background: var(--text-dark);
    color: var(--white);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    max-width: 400px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--danger-color);
}

.notification.warning {
    background: #f59e0b;
}

/* Navbar Tweaks specifically for this page if needed */
.navbar {
    height: 70px;
}

/* Responsive */
@media (max-width: 768px) {
    .create-ad-container {
        padding: 1.5rem 1rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-section {
        padding: 1.5rem;
    }

    .image-preview {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions button {
        width: 100%;
        justify-content: center;
    }
}
