
.trstemp-customization-page {
    display: grid;
    grid-template-rows: 1fr auto;
    grid-template-columns: 350px 1fr;
    height: 100vh;
    background: #f8f9fa;
    margin: 0;
    padding: 0;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999999;
}

.trstemp-customization-page > div:not(.step-3-footer) {
    display: flex;
    flex: 1;;
}

.customization-sidebar {
    width: 350px;
    min-width: 350px;
    background: white;
    border-right: 1px solid #e5e5e5;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    grid-row: 1;
    grid-column: 1;
}

.template-info {
    padding: 10px;
    border-bottom: 1px solid #e5e5e5;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.template-info h2 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 500;
    color: white;
}

.template-info p {
    margin: 0;
    opacity: 0.9;
}

.customization-sections {
    flex: 1;
    padding: 0;
}

.customization-section {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.customization-section h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.logo-upload {
    text-align: center;
}

.logo-preview {
    width: 120px;
    height: 60px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    color: #666;
}

.logo-preview:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.btn-upload {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-upload:hover {
    background: #5a6fd8;
}

.font-samples {
    margin: 15px 0;
    text-align: center;
}

.font-row {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 8px 0;
    font-family: 'Lato', sans-serif;
}

.font-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.font-option {
    padding: 8px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.font-option.active,
.font-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
    color: #667eea;
}

.color-palettes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.palette {
    text-align: center;
    cursor: pointer;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.palette:hover,
.palette.active {
    border-color: #667eea;
    background: #f8f9ff;
}

.palette-colors {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.palette-colors span {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: block;
}

.palette span:last-child {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-continue-float {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.btn-continue-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.btn-back {
    width: 100%;
    padding: 12px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    grid-row: 1;
    grid-column: 2;
}

.preview-header {
    padding: 20px 30px;
    background: white;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.preview-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-external,
.btn-refresh,
.btn-close {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-external:hover,
.btn-refresh:hover,
.btn-close:hover {
    background: #218838;
}

.btn-refresh {
    background: #667eea;
    padding: 8px 12px;
    font-size: 16px;
}

.btn-refresh:hover {
    background: #5a6fd8;
}

.btn-close {
    background: #dc3545;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: bold;
}

.btn-close:hover {
    background: #c82333;
}

.preview-container {
    flex: 1;
    padding: 0;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

#template-preview {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    display: block;
}

#preview-fallback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

.turbo-wizard-header,
.turbo-wizard-footer,
.turbo-wizard-steps {
    display: none !important;
}

@media (max-width: 1024px) {
    .trstemp-customization-page {
        flex-direction: column;
        height: 100vh;
        position: relative;
    }
    
    .customization-sidebar {
        width: 100%;
        max-height: 40vh;
    }
    
    .preview-area {
        height: 60vh;
    }
}

/* Step 3 Footer Styling */
.step-3-footer {
    padding: 10px 20px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    flex-shrink: 0;
    grid-row: 2;
    grid-column: 1 / -1;
}

.step-3-footer-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.step-3-footer #trstemp-action-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.step-3-footer #step3-back-btn {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e5e5e5;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-3-footer #step3-back-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Override button styles inside footer */
.step-3-footer .btn-continue-float {
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.step-3-footer .btn-continue-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}