/* Invitation Builder - Base Styling */
* {
    box-sizing: border-box;
}

#invitation-builder-container select {
    line-height: normal;
    margin-bottom: 0;
}

:root {
    /*--wizard-primary: #2271b1;
    --wizard-primary-hover: #135e96;
*/
    --wizard-primary: #f76b6a;
    ;
    --wizard-primary-hover: #f54543;
    --wizard-bg: #f0f2f5;
    --wizard-sidebar-bg: #fff;
    --wizard-border: #dcdfe6;
    --wizard-text: #2c3338;
    --wizard-text-muted: #646970;
    --wizard-success: #46b450;
    --wizard-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#invitation-builder-container {
    display: flex;
    min-height: 80vh;
    background: var(--wizard-bg);
    border: 1px solid var(--wizard-border);
    border-radius: 8px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--wizard-text);
}

/* Sidebar Styling */
.wizard-sidebar {
    width: 280px;
    background: var(--wizard-sidebar-bg);
    border-right: 1px solid var(--wizard-border);
    padding: 2rem 0;
    flex-shrink: 0;
}

.wizard-sidebar-item {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.wizard-sidebar-item:hover {
    background: #f8f9fa;
}

.wizard-sidebar-item.active {
    background: #f0f7ff;
    border-left-color: var(--wizard-primary);
    font-weight: 600;
    color: var(--wizard-primary);
}

.wizard-sidebar-item.completed .step-number {
    background: var(--wizard-primary);
    color: #fff;
}

.wizard-sidebar-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--wizard-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.wizard-sidebar-item.active .step-number {
    border-color: var(--wizard-primary);
}

/* Content Area */
.wizard-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.wizard-content {
    flex-grow: 1;
    padding: 3rem;
    /* max-width: 800px;*/
    margin: 0 auto;
    width: 100%;
}

.wizard-footer {
    padding: 1.5rem 3rem;
    border-top: 1px solid var(--wizard-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #fcfcfc;
}

.wizard-footer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Components */
.wizard-step-section h2 {
    font-size: 24px;
    margin-bottom: 0.5rem;
}

.wizard-step-section .description {
    color: var(--wizard-text-muted);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input,
.form-group input.datepicker,
.form-group input.timepicker,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--wizard-border);
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    box-sizing: border-box;
}

.form-group input.datepicker,
.form-group input.timepicker {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23646970' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-group.format-selector {
    background: #fcfcfc;
    padding: 15px;
    border-radius: 6px;
    border: 1px dashed var(--wizard-border);
}

.event-section {
    padding: 1rem 0;
    transition: opacity 0.3s;
}

.event-section:not(.is-enabled) {
    opacity: 0.6;
}

.event-section.is-hidden {
    display: none;
}

.form-group input:focus {
    border-color: var(--wizard-primary);
    box-shadow: 0 0 0 1px var(--wizard-primary);
    outline: none;
}

.form-group input.has-warning,
.form-group textarea.has-warning,
.form-group select.has-warning {
    border-color: #f59e0b;
    background-color: #fffbeb;
}

.form-group input.has-error,
.form-group textarea.has-error,
.form-group select.has-error {
    border-color: #d63638;
    background-color: #fff8f8;
}

.form-group input.is-valid,
.form-group textarea.is-valid,
.form-group select.is-valid {
    border-color: var(--wizard-success);
    background-color: #f8fff9;
}

.form-group input.has-warning:focus {
    box-shadow: 0 0 0 1px #f59e0b;
}

.form-group input.has-error:focus {
    box-shadow: 0 0 0 1px #d63638;
}

.form-group input.is-valid:focus {
    box-shadow: 0 0 0 1px var(--wizard-success);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* Buttons */
.wizard-btn {
    padding: 10px 15px;
    border-radius: 4px;
    border: 1px solid var(--wizard-border);
    background: #fff;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    letter-spacing: 0;
    text-transform: none;
}

.wizard-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wizard-btn-primary {
    background: var(--wizard-primary);
    color: #fff;
    border-color: var(--wizard-primary);
}

.wizard-btn-primary:hover {
    background: var(--wizard-primary-hover);
}
#wizard-prev{
    color:var(--wizard-primary-hover);
    border-color:var(--wizard-primary-hover);
}
#wizard-prev:hover{
    background:var(--wizard-primary);
    color:#fff;
}
/* Toast */
#builder-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #323232;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    transform: translateY(100px);
    transition: transform 0.3s ease-out;
    z-index: 9999;
}

#builder-toast.visible {
    transform: translateY(0);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #invitation-builder-container {
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .wizard-sidebar {
        width: 100%;
        display: flex;
        padding: 0;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--wizard-border);
    }

    .wizard-sidebar-item {
        padding: 1rem;
        flex-shrink: 0;
        border-left: none;
        border-bottom: 4px solid transparent;
    }

    .wizard-sidebar-item.active {
        border-bottom-color: var(--wizard-primary);
    }

    .wizard-content {
        padding: 1.5rem;
    }

    .wizard-footer {
        padding: 1rem 1.25rem;
        flex-direction: column;
        align-items: stretch;
    }

    .autosave-status {
        order: 3;
        text-align: center;
    }

    .wizard-footer-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .wizard-footer-actions .wizard-btn,
    #wizard-prev {
        width: 100%;
    }
}

/* Toggle Switch */
.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--wizard-primary);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.package-card {
    position: relative;
    border: 1px solid var(--wizard-border);
    border-radius: 12px;
    padding: 30px 24px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    text-align: center;
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.package-card.is-selected {
    border-color: var(--wizard-primary);
    background: #f0f7ff;
    box-shadow: 0 5px 15px rgba(34, 113, 177, 0.1);
}

.package-card.not-purchased {
    opacity: 0.85;
    border-style: dashed;
}

.package-card.not-purchased:hover {
    opacity: 1;
}

.package-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--wizard-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.package-card h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.package-card .price {
    font-size: 32px;
    font-weight: 800;
    color: var(--wizard-primary);
    margin: 10px 0 20px 0;
}

.buy-pkg-btn {
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.package-card ul.features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    flex-grow: 1;
    text-align: left;
}

.package-card ul.features li {
    padding: 10px 0;
    color: var(--wizard-text);
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.package-card ul.features li.is-available::before {
    content: "✓";
    color: var(--wizard-primary);
    font-weight: 800;
}

.package-card ul.features li.is-unavailable::before {
    content: "✕";
    color: #e53e3e;
    font-weight: 800;
}

.package-card ul.features li:last-child {
    border-bottom: none;
}

.wizard-btn-outline {
    background: transparent;
    border-color: var(--wizard-primary);
    color: var(--wizard-primary);
}

.wizard-btn-outline:hover {
    background: var(--wizard-primary);
    color: #fff;
}

/* Step 5 Summary */
.summary-box {
    background: #f9fafb;
    border-radius: 10px;
    padding: 24px;
    border: 1px solid var(--wizard-border);
    margin-bottom: 30px;
}

.summary-box p {
    margin: 10px 0;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
}

.summary-box p strong {
    color: var(--wizard-text-muted);
}

.final-actions .disclaimer {
    font-size: 13px;
    color: var(--wizard-text-muted);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

/* Guest Warning Overlay */
.guest-warning-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
    text-align: center;
}

.guest-warning-content {
    background: #fff;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    border: 1px solid #fef3c7;
}

.guest-warning-content .icon {
    font-size: 48px;
    margin-bottom: 1.5rem;
    display: block;
}

.guest-warning-content h2 {
    font-size: 24px;
    color: #92400e;
    margin-bottom: 1rem;
}

.guest-warning-content p {
    color: #b45309;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.guest-warning-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guest-warning-actions .wizard-btn {
    width: 100%;
}

.template-feature {
    margin-top: 10px;
    font-size: 13px;
    color: #2271b1;
    font-weight: 600;
    background: #eaf6ff;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-block;
    letter-spacing: 0.2px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.template-package {
    margin-top: 6px;
    font-size: 12px;
    color: #856404;
    background: #fff3cd;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-block;
    font-weight: 500;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

@media (max-width: 600px) {

    .template-feature,
    .template-package {
        font-size: 12px;
        padding: 3px 8px;
    }
}

/* Auth Modal */
.em-builder-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.em-builder-modal.is-active {
    display: flex;
}

.em-builder-modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.em-builder-modal .modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 460px;
    padding: 20px 22px 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

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

.em-builder-modal .close-modal {
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}
.em-builder-modal button,
.em-builder-modal button:hover{
	color:inherit;
}
.em-builder-modal .auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.em-builder-modal .auth-tab {
    flex: 1;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--wizard-border);
    background: #f7f7f7;
    cursor: pointer;
    font-weight: 600;
}

.em-builder-modal .auth-tab.is-active {
    background: #fff;
    border-color: var(--wizard-primary);
    color: var(--wizard-primary);
}

.em-builder-modal .auth-form {
    display: none;
}

.em-builder-modal .auth-form.is-active {
    display: block;
}

.em-builder-modal .auth-error {
    color: #d63638;
    margin: 8px 0 12px;
    min-height: 18px;
    font-size: 13px;
}

.em-builder-modal .auth-help {
    margin-top: 10px;
    font-size: 13px;
    color: var(--wizard-text-muted);
}

.em-builder-modal .auth-help a {
    color: var(--wizard-primary);
    text-decoration: none;
}