/* ============================================
   BOL Form - Premium Modern Styling
   ============================================ */

:root {
    --primary-color: #7c3aed;
    --primary-hover: #6d28d9;
    --primary-light: #a78bfa;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #1e1b4b;
    --light-bg: #faf5ff;
    --card-bg: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e9d5ff;
    --shadow-sm: 0 1px 2px 0 rgba(124, 58, 237, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(124, 58, 237, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(124, 58, 237, 0.15);
    --shadow-xl: 0 20px 25px -5px rgba(124, 58, 237, 0.2);
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #a78bfa 0%, #f0abfc 100%);
    --gradient-success: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

* {
    box-sizing: border-box;
}

/* Container */
.bol-form-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.bol-form-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

.bol-form-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px 0;
    letter-spacing: -1px;
}

.bol-form-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* Form */
.bol-form {
    animation: fadeInUp 0.6s ease-out;
}

/* Form Sections */
.bol-form-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.bol-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.bol-form-section:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
}

.section-title::before {
    content: '';
    width: 6px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 3px;
    margin-right: 12px;
}

/* Form Rows */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-row:last-child {
    margin-bottom: 0;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.form-group label .required {
    color: var(--error-color);
    margin-left: 4px;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: #f5f3ff;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    transform: translateY(-1px);
}

.form-control:hover:not(:focus) {
    border-color: var(--primary-light);
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-control:read-only {
    background: #f1f5f9;
    cursor: not-allowed;
    color: var(--text-secondary);
}

/* Select2 Customization */
.select2-container--default .select2-selection--single {
    height: 48px !important;
    padding: 10px 16px !important;
    font-size: 1rem !important;
    background: #f5f3ff !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
}

.select2-container--default .select2-selection--single:hover {
    border-color: var(--primary-light) !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    background: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px !important;
    color: var(--text-primary) !important;
    padding-left: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--text-secondary) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    right: 8px !important;
}

.select2-dropdown {
    border: 2px solid var(--primary-color) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-lg) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color) !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: var(--primary-light) !important;
    color: white !important;
}

/* Form Text */
.form-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 6px;
    display: block;
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: right;
}

/* Articles Section */
.article-item {
    background: #faf5ff;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border: 2px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.article-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.article-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Buttons */
.btn-add-article,
.btn-remove-article,
.btn-submit {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    outline: none;
}

.btn-add-article {
    background: var(--gradient-success);
    color: white;
    width: 100%;
    padding: 14px 24px;
    font-size: 1.0625rem;
    box-shadow: var(--shadow-md);
}

.btn-add-article:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-add-article:active {
    transform: translateY(0);
}

.btn-add-article span:first-child {
    font-size: 1.5rem;
    line-height: 1;
}

.btn-remove-article {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 8px 16px;
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
}

.btn-remove-article:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-remove-article span:first-child {
    font-size: 1.25rem;
    line-height: 1;
}

/* Submit Button */
.form-actions {
    margin-top: 40px;
    text-align: center;
}

.btn-submit {
    background: var(--gradient-primary);
    color: white;
    padding: 16px 48px;
    font-size: 1.125rem;
    box-shadow: var(--shadow-lg);
    min-width: 250px;
    position: relative;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(-1px);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Messages */
.form-messages {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    display: none;
    animation: slideInUp 0.4s ease-out;
}

.form-messages.show {
    display: block;
}

.form-messages.success {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    color: #065f46;
    border: 2px solid #10b981;
}

.form-messages.error {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #991b1b;
    border: 2px solid #ef4444;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .bol-form-title {
        font-size: 2rem;
    }

    .bol-form-container {
        padding: 0 15px;
    }

    .bol-form-section {
        padding: 25px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .btn-submit {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .bol-form-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .bol-form-section {
        padding: 20px 15px;
    }
}