/* =====================================================
   Campaign Builder - Common Styles
   Used across all campaign builder views
   ===================================================== */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
    margin: 0;
    font-weight: 600;
    font-size: 2.5rem;
}

.page-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Campaign Builder Sections */
.campaign-builder-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.campaign-builder-section:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.campaign-builder-section h1 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #667eea;
    display: inline-block;
}

/* Common Info Card */
.common-info-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.common-info-card .card-header {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 1.5rem;
}

.common-info-card .card-header h3 {
    font-weight: 600;
    font-size: 1.4rem;
    margin: 0;
    color: white;
}

.common-info-card .card-body {
    background: white;
    padding: 2rem;
}

.common-info-card label {
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.common-info-card .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.common-info-card .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* Form Groups & Labels */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    color: #4a5568;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

label.inline {
    display: inline-block;
    margin-right: 1rem;
}

.form-label {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.form-label.required::after {
    content: '*';
    color: #f56565;
    margin-left: 0.25rem;
}

/* Form Styling */
.campaign-builder-section table {
    width: 100%;
}

.campaign-builder-section td {
    padding: 0.75rem;
    vertical-align: middle;
}

.campaign-builder-section td:first-child {
    font-weight: 600;
    color: #4a5568;
    width: 180px;
    padding-right: 1rem;
}

/* Global Input Styles */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #2d3748;
    background-color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Hover State */
input[type="text"]:hover,
input[type="number"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
textarea:hover,
select:hover {
    border-color: #cbd5e0;
    background-color: #f7fafc;
}

/* Focus State */
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Placeholder Styles */
input::placeholder,
textarea::placeholder {
    color: #a0aec0;
    opacity: 1;
    font-style: italic;
}

input:focus::placeholder,
textarea:focus::placeholder {
    color: #cbd5e0;
}

/* Disabled State */
input:disabled,
textarea:disabled,
select:disabled {
    background-color: #f7fafc;
    border-color: #e2e8f0;
    color: #a0aec0;
    cursor: not-allowed;
    opacity: 0.6;
}

/* File Input Styles */
input[type="file"] {
    padding: 0.5rem;
    cursor: pointer;
    border: 2px dashed #e2e8f0;
    background-color: #f7fafc;
}

input[type="file"]:hover {
    border-color: #cbd5e0;
    background-color: #edf2f7;
}

input[type="file"]:focus {
    border-color: #667eea;
    border-style: solid;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* File Upload Button */
input[type="file"]::-webkit-file-upload-button {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-right: 1rem;
}

input[type="file"]::-webkit-file-upload-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

input[type="file"]::-webkit-file-upload-button:active {
    transform: translateY(0);
}

/* Select Dropdown */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

select option {
    padding: 0.5rem;
}

/* Textarea */
textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* Input Groups */
.input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.input-group input,
.input-group select {
    flex: 1;
}

/* Input Icons */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

.input-with-icon input {
    padding-left: 2.5rem;
}

/* Required Field Indicator */
.required-field::after {
    content: '*';
    color: #f56565;
    margin-left: 0.25rem;
    font-weight: bold;
}

/* Input Validation States */
input.is-valid,
select.is-valid,
textarea.is-valid {
    border-color: #48bb78;
}

input.is-valid:focus,
select.is-valid:focus,
textarea.is-valid:focus {
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
    border-color: #f56565;
}

input.is-invalid:focus,
select.is-invalid:focus,
textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
}

/* Help Text */
.input-help {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 0.25rem;
}

.input-error {
    font-size: 0.85rem;
    color: #f56565;
    margin-top: 0.25rem;
}

/* Checkbox and Radio */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
    cursor: pointer;
}

/* Number Input Arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    height: 40px;
}

/* Campaign Builder Section Specific Overrides */
.campaign-builder-section input[type="text"],
.campaign-builder-section input[type="number"],
.campaign-builder-section input[type="email"],
.campaign-builder-section input[type="file"],
.campaign-builder-section select,
.campaign-builder-section textarea {
    background-color: #f7fafc;
}

.campaign-builder-section input[type="text"]:focus,
.campaign-builder-section input[type="number"]:focus,
.campaign-builder-section input[type="email"]:focus,
.campaign-builder-section select:focus,
.campaign-builder-section textarea:focus {
    background-color: #ffffff;
}

/* Action Buttons Section */
.action-buttons-section {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    margin: 3rem 0;
}

.action-buttons-section h2 {
    color: white;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.action-buttons-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.btn-create-all {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

.btn-create-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: white;
}

.btn-download-templates {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

.btn-download-templates:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: white;
}

.btn-create-all i,
.btn-download-templates i {
    margin-right: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .campaign-builder-section {
        padding: 1.5rem;
    }
    
    .campaign-builder-section h1 {
        font-size: 1.3rem;
    }
    
    .campaign-builder-section td:first-child {
        width: 120px;
        font-size: 0.9rem;
    }
    
    .btn-create-all,
    .btn-download-templates {
        width: 100%;
        margin: 0.5rem 0;
        padding: 0.9rem 2rem;
        font-size: 1.1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.campaign-builder-section {
    animation: fadeInUp 0.5s ease-out;
}

/* Additional utility classes */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge-campaign {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Form Layout Utilities */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row > * {
    flex: 1;
}

.form-col-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-col-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-col-2,
    .form-col-3 {
        grid-template-columns: 1fr;
    }
}

/* Spacing Utilities */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }

.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: #718096; }
.text-primary { color: #667eea; }
.text-success { color: #48bb78; }
.text-danger { color: #f56565; }
.text-warning { color: #ed8936; }

.font-bold { font-weight: 600; }
.font-semibold { font-weight: 500; }
.font-normal { font-weight: 400; }

/* Display Utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

/* Flex Utilities */
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }

/* Border Utilities */
.border { border: 1px solid #e2e8f0; }
.border-0 { border: none; }
.rounded { border-radius: 8px; }
.rounded-full { border-radius: 9999px; }

/* Shadow Utilities */
.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); }

/* Width Utilities */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-50 { width: 50%; }
.w-75 { width: 75%; }

/* Background Utilities */
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f7fafc; }
.bg-gray-100 { background-color: #edf2f7; }
.bg-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }

/* Cursor Utilities */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Overflow Utilities */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Position Utilities */
.relative { position: relative; }
.absolute { position: absolute; }

/* Z-index Utilities */
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }
