/* Post Ad Page Styles */

:root {
    --primary-color: #5568d3;
    --primary-light: #6c8eff;
    --primary-dark: #3a5bd9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
}

body.modern-theme {
    background-color: #f8fafc;
    background-image:
        radial-gradient(at 15% 10%, rgba(74, 108, 247, 0.03) 0px, transparent 50%),
        radial-gradient(at 85% 90%, rgba(74, 108, 247, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
}

/* Main container */
main.container {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    padding: 0 var(--spacing-md);
    max-width: 1400px;
}

/* Post ad container */
.post-ad-container {
    width: 100%;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background-color: transparent;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0;
    box-shadow: var(--shadow-lg);
}

/* Sidebar styling */
.post-ad-sidebar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: var(--spacing-xl);
    position: relative;
    overflow: hidden;
    margin-top: var(--spacing-xl);
    padding-top: calc(var(--spacing-xl) * 2);
}

.post-ad-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,.1)' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.7;
    z-index: 0;
}

.post-ad-sidebar::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    opacity: 0.6;
    z-index: 0;
}

.post-ad-sidebar-content {
    position: relative;
    z-index: 1;
    margin-top: var(--spacing-lg);
}

.sidebar-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    background: linear-gradient(to right, #ffffff, rgba(255, 255, 255, 0.85));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-subtitle {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

/* Post steps styling */
.post-steps {
    margin-top: var(--spacing-xl);
}

.post-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
    cursor: default;
    position: relative;
}

.post-step:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.post-step-number {
    background: rgba(255, 255, 255, 0.25);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: var(--spacing-md);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.step-content h3 {
    margin: 0 0 var(--spacing-xs);
    font-size: 1.05rem;
}

.step-content p {
    margin: 0;
    opacity: 0.85;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Main content area */
.post-ad-main {
    background-color: var(--bg-white);
    padding: var(--spacing-xl);
    position: relative;
    margin-top: var(--spacing-xl);
    padding-top: calc(var(--spacing-xl) * 2);
}

.post-ad-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234a6cf7' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
    z-index: 0;
}

.post-ad-main>* {
    position: relative;
    z-index: 1;
}

/* Form section styling */
.form-section {
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-lg);
    background-color: var(--bg-white);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.form-section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-light));
    opacity: 0.7;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

/* Form group styling */
.form-group {
    margin-bottom: var(--spacing-md);
    position: relative;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-white);
    color: var(--text-dark);
    font-size: 1rem;
    transition: var(--transition-normal);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

.form-control.error {
    border-color: var(--error-color);
    background-color: rgba(239, 68, 68, 0.02);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.1);
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-control.valid {
    border-color: var(--success-color);
    background-color: rgba(16, 185, 129, 0.02);
}

.form-control.valid:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.error-message {
    display: none;
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background-color: rgba(239, 68, 68, 0.08);
    border-left: 3px solid var(--error-color);
    animation: fadeIn 0.3s ease-in;
    font-weight: 500;
}

.error-message.show {
    display: block;
}

.error-icon,
.success-icon {
    position: absolute;
    right: 12px;
    top: 38px;
    width: 18px;
    height: 18px;
    display: none;
}

.error-icon {
    color: var(--error-color);
}

.success-icon {
    color: var(--success-color);
}

.form-control.error+.error-icon {
    display: block;
}

.form-control.valid+.success-icon {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Button styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background-color: var(--border-color);
}

/* File upload styling */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    transition: var(--transition-normal);
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--primary-color);
    background-color: rgba(74, 108, 247, 0.05);
}

.file-limit-note {
    font-size: 0.8rem;
    margin-top: 8px;
    color: var(--text-light);
    font-style: italic;
}

/* Toast notification styling */
.toast {
    position: fixed;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    animation: fadeInDown 0.3s ease-in-out;
    max-width: 400px;
    left: 50%;
    transform: translateX(-50%);
    top: 20px;
}

.toast.success {
    background-color: #d1f7e9;
    color: #0c6b58;
    border-left: 4px solid var(--success-color);
}

.toast.error {
    background-color: #fee2e2;
    color: #b91c1c;
    border-left: 4px solid var(--error-color);
}

.toast.form-error {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin-top: 1rem;
    margin-bottom: 1rem;
    width: 100%;
    animation: fadeIn 0.3s ease-in-out;
}

.submit-section {
    margin-top: var(--spacing-md);
    position: relative;
}

.submit-section .form-error-container {
    margin-top: 1rem;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .post-ad-container {
        grid-template-columns: 1fr;
    }

    .post-ad-sidebar {
        padding: var(--spacing-lg);
    }

    .post-ad-main {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 767px) {
    .form-section {
        padding: var(--spacing-md);
    }

    .sidebar-title {
        font-size: 1.75rem;
    }
}
