/* Onboarding Styles */

#step-1 h2,
#step-2 h2,
#step-3 h2,
#step-4 h2 {
    text-align: center;
    margin-bottom: 30px;
}

.brand-logo-upload {
    text-align: center;
    margin-bottom: 30px;
}

.brand-logo-label {
    cursor: pointer;
    display: inline-block;
}

.logo-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px dashed #ccc;
}

#logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.onboarding-form-group {
    margin-bottom: 20px;
    text-align: center;
}

.form-control-brand {
    padding: 10px;
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.form-control-brand.textarea {
    min-height: 80px;
}

.dropzone-container {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-top: 30px;
    cursor: pointer;
}

.dropzone-icon {
    font-size: 32px;
    color: #aaa;
    margin-bottom: 15px;
}

.dropzone-desc {
    color: #666;
    font-size: 14px;
}

.docs-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.actions {
    margin-top: 40px;
}

.actions-right {
    text-align: right;
}

.actions-between {
    display: flex;
    justify-content: space-between;
}

.btn-next,
.btn-finish {
    padding: 12px 30px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-back {
    padding: 12px 30px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}

.active-themes {
    margin-bottom: 30px;
}

#themes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.add-theme-input {
    position: relative;
}

#new-theme-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.ai-suggestions {
    margin-top: 40px;
}

.ai-suggestions-title {
    color: #666;
    font-size: 16px;
    margin-bottom: 15px;
}

.ai-suggestions-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

#ai-suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.team-management {
    max-width: 500px;
    margin: 0 auto;
}

.team-form-group {
    margin-bottom: 20px;
}

.team-input-group {
    display: flex;
    gap: 10px;
}

.team-input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.btn-add {
    padding: 10px 20px;
    background: #eee;
    border: none;
    border-radius: 8px;
}

#invites-list {
    margin-top: 20px;
}

.governance-link {
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
}

.governance-link a {
    color: #666;
}

.notifications-config {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 20px;
}

#notify-toggle {
    transform: scale(1.5);
}

.email-badge {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    padding: 15px;
    border-radius: 12px;
    color: #0050b3;
    font-size: 14px;
}

.email-badge i {
    margin-right: 8px;
}

.steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    margin-top: 40px;
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eee;
    margin: 0 auto;
    line-height: 30px;
    font-weight: bold;
}

.step-label {
    margin-top: 8px;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* Premium Inputs (New) */
.premium-input-group {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 2px 15px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.premium-input-group:focus-within {
    border-color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.input-icon {
    width: 30px;
    color: #666;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 10px;
    font-size: 15px;
    background: transparent;
    color: #333;
    min-width: 0;
    /* Fix flex overflow */
}

.btn-add-link {
    background: transparent;
    border: 1px dashed #bbb;
    color: #666;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    width: 100%;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-link:hover {
    border-color: #666;
    color: #333;
    background: #fafafa;
}

.remove-link-btn {
    background: transparent;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 5px;
    margin-left: 5px;
    font-size: 14px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-link-btn:hover {
    color: #ff4d4f;
}

.dynamic-link {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Channels & Modal Styles --- */

.channels-section {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.channels-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.channel-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s ease;
}

.channel-card:hover {
    border-color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.channel-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
}

.channel-info {
    flex: 1;
}

.channel-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.channel-info p {
    margin: 3px 0 0 0;
    font-size: 12px;
    color: #888;
}

.channel-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
}

.channel-actions button:hover {
    color: #000;
}

.btn-add-channel {
    width: 100%;
    background: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-add-channel:hover {
    background: #fff;
    border-color: #000;
    color: #000;
}

.add-icon-circle {
    width: 24px;
    height: 24px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.channel-config-modal {
    background: #fff;
    width: 100%;
    max-width: 550px;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
}

.modal-body label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #444;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .col {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

/* Format Selector */
.format-selector {
    display: flex;
    gap: 15px;
}

.format-check {
    display: none;
}

.format-option {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.format-check:checked+.format-option {
    border-color: #000;
    background: #f5f5f7;
    color: #000;
    font-weight: 600;
}

/* Routines Grid */
.routines-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.routine-day input {
    display: none;
}

.routine-day span {
    display: block;
    padding: 8px 0;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
}

.routine-day input:checked+span {
    background: #000;
    color: #fff;
    border-color: #000;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
}

.btn-cancel {
    background: none;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-save {
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* Cards Selection (Step 0) */
.cards-selection {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

@media (min-width: 768px) {
    .cards-selection {
        flex-direction: row;
        gap: 20px;
    }
}

.selection-card {
    flex: 1;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
}

.selection-card:hover {
    border-color: #bbb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

input[name="usageIntent"]:checked+.selection-card {
    border-color: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    background: #fafafa;
    border-width: 1px;
    /* Maintain width to avoid jump */
    outline: 1px solid #000;
    /* Extra visibility */
}

.card-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.card-title {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 5px;
    color: #333;
}

.card-desc {
    font-size: 0.9em;
    color: #666;
}

/* Step 0 specific spacing */
#step-0 .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

#step-0 .premium-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.2s;
}

#step-0 .premium-input:focus {
    border-color: #000;
    outline: none;
}

/* Desktop Improvements */
@media (min-width: 768px) {
    .form-row-desktop {
        display: flex;
        gap: 20px;
    }

    .form-row-desktop .flex-child {
        flex: 1;
    }
}