/* Campaign Form Styles */

.campaign-form-section {
    min-height: 100vh;
    padding: 1rem 0 2rem;
    background: var(--bg-light);
    overflow-x: hidden;
}

@media (min-width: 768px) {
    .campaign-form-section {
        padding: 1.5rem 0 3rem;
    }
}

@media (min-width: 1024px) {
    .campaign-form-section {
        padding: 2rem 0 4rem;
    }
}

/* Progress Bar */
.progress-container {
    max-width: min(600px, calc(100% - 2rem));
    margin: 0 auto 3rem;
}

.progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-gray);
}

.progress-labels span.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Form Container */
.form-container {
    max-width: min(800px, calc(100% - 2rem));
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 1.5rem;
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
    .form-container {
        padding: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .form-container {
        padding: 3rem;
    }
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .form-header {
        margin-bottom: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .form-header {
        margin-bottom: 3rem;
    }
}

.form-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .form-header h1 {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .form-header h1 {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    .form-header h1 {
        font-size: 2.5rem;
    }
}

.form-header p {
    font-size: 1rem;
    color: var(--text-gray);
}

@media (min-width: 768px) {
    .form-header p {
        font-size: 1.125rem;
    }
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeInStep 0.4s ease;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .form-step h2 {
        font-size: 1.625rem;
    }
}

@media (min-width: 1024px) {
    .form-step h2 {
        font-size: 1.75rem;
    }
}

.step-description {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* Business Type Grid */
.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.business-card {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .business-card {
        padding: 1.5rem 1rem;
    }
}

.business-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.business-card.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.business-card.selected::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
}

.business-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .business-icon {
        font-size: 2.5rem;
    }
}

.business-card span {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Input Groups */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    max-width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Card Type Grid */
.card-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card-type-option {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .card-type-option {
        padding: 1.5rem;
    }
}

.card-type-option:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.card-type-option.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.card-type-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.card-type-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
}

.popular-badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-type-option p {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Card Preview Mini */
.card-preview-mini {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-stamps {
    display: flex;
    gap: 0.35rem;
}

.mini-stamp {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    border-radius: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-gray);
}

.mini-stamp.filled {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.points-display {
    text-align: center;
}

.points-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.points-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.membership-badge-mini {
    background: var(--gradient-1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.35rem;
    font-weight: 700;
    font-size: 0.875rem;
}

.coupon-text-mini {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Additional Card Type Mini Previews */
.ticket-mini {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.boarding-mini {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.gift-mini {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.business-mini {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.policy-mini {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Config Groups */
.config-group {
    display: none;
}

.config-group.active {
    display: block;
}

.coupon-text-mini {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Color Picker */
.color-picker-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-white);
}

.color-input {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 0.35rem;
    cursor: pointer;
}

.color-value {
    font-family: monospace;
    font-size: 0.95rem;
    color: var(--text-gray);
}

/* Card Preview Large */
.card-preview-large {
    margin-top: 2rem;
}

.preview-card {
    background: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    min-height: 200px;
    box-shadow: var(--shadow-xl);
}

.preview-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.preview-content {
    margin-top: 1.5rem;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 2rem 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-message h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.success-message p {
    color: var(--text-gray);
    max-width: 500px;
    margin: 0 auto;
}

.final-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Form Navigation */
.form-navigation {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.form-navigation button {
    min-width: 120px;
}

/* Responsive */
@media (max-width: 1024px) {
    .business-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.875rem;
    }

    .card-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .campaign-form-section {
        padding: 1rem 0 2rem;
    }

    .progress-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .form-container {
        padding: 2rem 1.5rem;
        border-radius: 1rem;
    }

    .form-header {
        margin-bottom: 2rem;
    }

    .form-header h1 {
        font-size: 2rem;
    }

    .form-header p {
        font-size: 1rem;
    }

    .form-step h2 {
        font-size: 1.5rem;
    }

    .step-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .business-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .business-card {
        padding: 1.25rem 0.875rem;
    }

    .business-icon {
        font-size: 2rem;
    }

    .business-card span {
        font-size: 0.875rem;
    }

    .card-type-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        gap: 1rem;
    }

    .card-type-option {
        padding: 1.25rem;
    }

    .card-type-header h3 {
        font-size: 1rem;
    }

    .card-type-option p {
        font-size: 0.8125rem;
    }

    .color-picker-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .preview-card {
        padding: 1.5rem;
    }

    .preview-card h3 {
        font-size: 1.25rem;
    }

    .form-navigation {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .form-navigation button {
        min-width: 100px;
    }

    .input-group label {
        font-size: 0.9375rem;
    }

    .form-input,
    .form-input select,
    .form-input textarea {
        font-size: 0.9375rem;
    }
}

@media (max-width: 480px) {
    .campaign-form-section {
        padding: 0.5rem 0 1.5rem;
    }

    .progress-container {
        margin-bottom: 2rem;
    }

    .form-container {
        padding: 1.5rem 1rem;
        border-radius: 0.75rem;
    }

    .form-header {
        margin-bottom: 1.5rem;
    }

    .form-header h1 {
        font-size: 1.75rem;
    }

    .form-header p {
        font-size: 0.9375rem;
    }

    .form-step h2 {
        font-size: 1.375rem;
    }

    .step-description {
        font-size: 0.875rem;
    }

    .business-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }

    .business-card {
        padding: 1rem 0.75rem;
    }

    .business-icon {
        font-size: 1.75rem;
        margin-bottom: 0.375rem;
    }

    .business-card span {
        font-size: 0.8125rem;
    }

    .card-type-grid {
        gap: 0.875rem;
    }

    .card-type-option {
        padding: 1rem;
    }

    .card-type-header h3 {
        font-size: 0.9375rem;
    }

    .popular-badge {
        font-size: 0.625rem;
        padding: 0.2rem 0.4rem;
    }

    .card-type-option p {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .card-preview-mini {
        padding: 0.75rem;
        min-height: 50px;
    }

    .mini-stamp {
        width: 28px;
        height: 28px;
        font-size: 0.6875rem;
    }

    .coupon-text-mini,
    .gift-mini {
        font-size: 1.25rem;
    }

    .ticket-mini,
    .boarding-mini,
    .business-mini,
    .policy-mini {
        font-size: 1rem;
    }

    .input-group {
        margin-bottom: 1rem;
    }

    .input-group label {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
    }

    .form-input {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .color-input {
        width: 50px;
        height: 36px;
    }

    .color-value {
        font-size: 0.875rem;
    }

    .preview-card {
        padding: 1.25rem;
        min-height: 180px;
    }

    .preview-card h3 {
        font-size: 1.125rem;
    }

    .form-navigation {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .form-navigation button {
        width: 100%;
        min-width: unset;
    }

    .success-icon {
        width: 64px;
        height: 64px;
        font-size: 2.5rem;
    }

    .success-message h2 {
        font-size: 1.5rem;
    }

    .final-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .final-actions .btn-primary,
    .final-actions .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .business-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .business-card {
        padding: 0.875rem 0.5rem;
    }

    .business-icon {
        font-size: 1.5rem;
    }

    .business-card span {
        font-size: 0.75rem;
    }

    .form-header h1 {
        font-size: 1.5rem;
    }

    .form-step h2 {
        font-size: 1.25rem;
    }

    .mini-stamp {
        width: 24px;
        height: 24px;
        font-size: 0.625rem;
    }
    
    .card-type-option {
        border-width: 1.5px;
    }

    .color-picker-group {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column-reverse;
    }

    .form-navigation button {
        width: 100%;
    }

    .final-actions {
        flex-direction: column;
    }

    .final-actions .btn-large {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 1.5rem 1rem;
    }

    .form-header h1 {
        font-size: 1.75rem;
    }

    .business-grid {
        grid-template-columns: 1fr;
    }

    .business-card {
        padding: 1.25rem 1rem;
    }

    .business-icon {
        font-size: 2rem;
    }

    .preview-card {
        padding: 1.5rem;
    }
}

/* QR Content Options */
.qr-content-option {
    transition: all 0.2s ease;
}

.qr-content-option:hover {
    border-color: #a5b4fc !important;
    background: #fafafa !important;
}

.qr-content-option input[type="radio"]:checked + div::before {
    content: '✓';
    display: inline-block;
    margin-right: 0.5rem;
    color: #6366f1;
}

/* Custom Fields Section */
.custom-field-row {
    transition: all 0.2s ease;
}

.custom-field-row:hover {
    border-color: #22c55e !important;
}

.custom-field-row button:hover {
    background: #fecaca !important;
}

/* Mini Stamps in Preview */
.mini-stamps {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.mini-stamp {
    width: 24px;
    height: 24px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #94a3b8;
    background: white;
}

.mini-stamp.filled {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

/* Points Display Mini */
.points-display-mini {
    background: linear-gradient(135deg, #f59e0b 0%, #eab308 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}

/* Membership Badge Mini */
.membership-badge-mini {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}
