/* =============================================
   Czechodruk Banner Creator - Frontend Styles
   ============================================= */

.cbc-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
    position: relative;
}

.cbc-wrapper *,
.cbc-wrapper *::before,
.cbc-wrapper *::after {
    box-sizing: border-box;
}

/* Steps Navigation */
.cbc-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    gap: 0;
}

.cbc-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: default;
    transition: all 0.3s;
}

.cbc-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
}

.cbc-step-label {
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    transition: all 0.3s;
}

.cbc-step.active .cbc-step-number {
    background: #1a73e8;
    color: #fff;
}

.cbc-step.active .cbc-step-label {
    color: #1a73e8;
    font-weight: 600;
}

.cbc-step.completed .cbc-step-number {
    background: #22c55e;
    color: #fff;
}

.cbc-step.completed .cbc-step-label {
    color: #22c55e;
}

.cbc-step-line {
    width: 60px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 4px;
}

/* Panels */
.cbc-panel {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
}

.cbc-panel-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 24px;
    color: #0f172a;
}

.cbc-step-content {
    display: none;
}

.cbc-step-content.active {
    display: block;
}

/* Sections */
.cbc-section {
    margin-bottom: 28px;
}

.cbc-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #334155;
}

/* Banner Type Cards */
.cbc-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.cbc-type-card {
    display: block;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s;
    background: #fff;
}

.cbc-type-card:hover {
    border-color: #93c5fd;
    background: #f0f7ff;
}

.cbc-type-card.selected {
    border-color: #1a73e8;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.cbc-type-card input[type="radio"] {
    display: none;
}

.cbc-type-card-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cbc-type-card-inner strong {
    font-size: 15px;
    color: #0f172a;
}

.cbc-type-price {
    font-size: 20px;
    font-weight: 700;
    color: #1a73e8;
}

.cbc-type-card-inner small {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

/* Dimensions */
.cbc-dimensions-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.cbc-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cbc-field label {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.cbc-field input[type="number"],
.cbc-field input[type="text"],
.cbc-field input[type="email"],
.cbc-field input[type="tel"],
.cbc-field textarea,
.cbc-field select {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    min-width: 120px;
}

.cbc-field input:focus,
.cbc-field textarea:focus,
.cbc-field select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}

.cbc-field-separator {
    font-size: 20px;
    font-weight: 700;
    color: #94a3b8;
    padding-bottom: 10px;
}

/* Dimension Preview */
.cbc-dimension-preview {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.cbc-preview-box {
    width: 300px;
    height: 150px;
    border: 2px dashed #93c5fd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    transition: all 0.3s;
}

.cbc-preview-box span {
    font-size: 14px;
    font-weight: 600;
    color: #1a73e8;
}

/* Grommet Options */
.cbc-grommet-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.cbc-radio-card {
    display: block;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px;
    transition: all 0.2s;
    background: #fff;
}

.cbc-radio-card:hover {
    border-color: #93c5fd;
}

.cbc-radio-card.selected {
    border-color: #1a73e8;
    background: #eff6ff;
}

.cbc-radio-card input[type="radio"] {
    display: none;
}

.cbc-radio-card-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cbc-radio-card-inner strong {
    font-size: 14px;
}

.cbc-radio-card-inner small {
    font-size: 12px;
    color: #64748b;
}

.cbc-custom-grommets {
    margin-top: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cbc-grommet-info {
    margin-top: 10px;
    padding: 10px 14px;
    background: #f0f7ff;
    border-radius: 8px;
    font-size: 14px;
    color: #1a73e8;
}

/* Price Box */
.cbc-price-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.cbc-price-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: #475569;
}

.cbc-price-row span:last-child {
    font-weight: 600;
    color: #1e293b;
}

.cbc-price-total {
    border-top: 2px solid #1a73e8;
    margin-top: 8px;
    padding-top: 12px !important;
    font-size: 18px !important;
}

.cbc-price-total span {
    color: #1a73e8 !important;
    font-weight: 700 !important;
}

/* Buttons */
.cbc-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.cbc-btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.cbc-btn-primary {
    background: #1a73e8;
    color: #fff;
}

.cbc-btn-primary:hover:not(:disabled) {
    background: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,115,232,0.3);
}

.cbc-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.cbc-btn-secondary:hover {
    background: #e2e8f0;
}

.cbc-btn-outline {
    background: transparent;
    border: 2px solid #d1d5db;
    color: #475569;
}

.cbc-btn-outline:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.cbc-btn-large {
    padding: 14px 36px;
    font-size: 17px;
}

/* =============================================
   Designer Styles
   ============================================= */
.cbc-designer-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.cbc-designer-toolbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cbc-tool-group {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
}

.cbc-tool-group h4 {
    margin: 0 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.cbc-tool-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #334155;
    transition: all 0.15s;
    margin-bottom: 4px;
}

.cbc-tool-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1a73e8;
}

.cbc-prop-row {
    margin-bottom: 8px;
}

.cbc-prop-row label {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 3px;
}

.cbc-prop-row input[type="color"] {
    width: 100%;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
}

.cbc-prop-row input[type="number"],
.cbc-prop-row select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
}

.cbc-text-styles {
    display: flex;
    gap: 4px;
}

.cbc-style-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s;
}

.cbc-style-btn:hover {
    background: #f0f7ff;
    border-color: #93c5fd;
}

.cbc-style-btn.active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

/* Canvas Area */
.cbc-designer-canvas-wrapper {
    min-width: 0;
}

.cbc-canvas-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: #64748b;
}

.cbc-canvas-info span:first-child {
    font-weight: 600;
    color: #1a73e8;
}

.cbc-canvas-hint {
    font-size: 12px;
}

.cbc-canvas-container {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.cbc-canvas-container canvas {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* =============================================
   Summary Styles
   ============================================= */
.cbc-summary-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.cbc-summary-preview h3,
.cbc-summary-details h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #334155;
}

.cbc-summary-preview img {
    max-width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.cbc-no-design {
    padding: 40px;
    text-align: center;
    color: #94a3b8;
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
}

.cbc-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.cbc-summary-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.cbc-summary-table td:first-child {
    font-weight: 500;
    color: #64748b;
    width: 45%;
}

.cbc-summary-table td:last-child {
    font-weight: 600;
    color: #1e293b;
}

.cbc-sum-total td {
    border-top: 2px solid #1a73e8 !important;
    border-bottom: none !important;
    font-size: 18px !important;
    color: #1a73e8 !important;
    font-weight: 700 !important;
    padding-top: 14px !important;
}

/* Customer Form */
.cbc-customer-form {
    margin-bottom: 20px;
}

.cbc-customer-form h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #334155;
}

.cbc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cbc-field-full {
    grid-column: 1 / -1;
}

.cbc-consent {
    margin-bottom: 16px;
    font-size: 13px;
    color: #64748b;
}

.cbc-consent label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.cbc-consent input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Success Message */
.cbc-success-message {
    text-align: center;
    padding: 40px 20px;
}

.cbc-success-icon {
    margin-bottom: 16px;
}

.cbc-success-message h2 {
    font-size: 24px;
    color: #22c55e;
    margin: 0 0 12px;
}

.cbc-success-message p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 8px;
}

.cbc-success-message .cbc-btn {
    margin-top: 20px;
}

/* =============================================
   Proforma Notice
   ============================================= */
.cbc-proforma-notice {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.6;
    color: #78350f;
}

/* =============================================
   Buyer Type & Delivery Options
   ============================================= */
.cbc-buyer-type-options,
.cbc-delivery-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.cbc-buyer-type-options .cbc-radio-card,
.cbc-delivery-options .cbc-radio-card {
    padding: 14px 16px;
}

.cbc-buyer-type-options .cbc-radio-card-inner small,
.cbc-delivery-options .cbc-radio-card-inner small {
    display: block;
    margin-top: 2px;
}

.cbc-company-fields,
.cbc-shipping-fields {
    margin-top: 12px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.cbc-company-fields h4,
.cbc-shipping-fields h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.cbc-btn-small {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #d1d5db;
    background: #f1f5f9;
    color: #475569;
    transition: all 0.2s;
    margin-top: 8px;
    display: inline-block;
}

.cbc-btn-small:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

@media (max-width: 768px) {
    .cbc-buyer-type-options,
    .cbc-delivery-options {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   Multi-Banner Items
   ============================================= */
.cbc-banner-item {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    background: #fafbfc;
    transition: border-color 0.2s;
}

.cbc-banner-item:hover {
    border-color: #93c5fd;
}

.cbc-banner-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cbc-banner-item-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a73e8;
    margin: 0;
}

.cbc-btn-remove-banner {
    background: none;
    border: 2px solid #fca5a5;
    color: #dc2626;
    font-size: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.cbc-btn-remove-banner:hover {
    background: #dc2626;
    color: #fff;
}

.cbc-banner-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #475569;
}

.cbc-item-price-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #eff6ff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 15px;
}

.cbc-item-price-box strong {
    font-size: 18px;
    color: #1a73e8;
}

.cbc-add-banner-row {
    text-align: center;
    margin: 12px 0 20px;
}

.cbc-btn-add-banner {
    background: #f0f7ff;
    border: 2px dashed #93c5fd;
    color: #1a73e8;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cbc-btn-add-banner:hover {
    background: #dbeafe;
    border-color: #1a73e8;
}

/* DPI Info */
.cbc-dpi-info {
    margin-top: 8px;
}

.cbc-dpi-badge {
    display: inline-block;
    padding: 5px 12px;
    background: #fef3c7;
    border-radius: 6px;
    font-size: 12px;
    color: #92400e;
}

.cbc-dpi-notice {
    padding: 8px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    margin-top: 6px;
}

.cbc-dpi-warning {
    font-size: 11px;
    color: #dc2626;
    line-height: 1.4;
}

/* =============================================
   Templates
   ============================================= */
.cbc-templates-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.cbc-templates-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #334155;
}

.cbc-templates-section h3 small {
    font-weight: 400;
    color: #94a3b8;
    font-size: 13px;
}

.cbc-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.cbc-template-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.cbc-template-card:hover {
    border-color: #1a73e8;
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.cbc-template-preview,
.cbc-template-mini {
    width: 100%;
    height: 60px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: block;
}

.cbc-template-card strong {
    font-size: 13px;
    color: #0f172a;
}

.cbc-template-card small {
    font-size: 11px;
    color: #64748b;
}

/* =============================================
   Designer Tabs
   ============================================= */
.cbc-designer-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.cbc-designer-tab {
    padding: 8px 18px;
    border: 2px solid #e2e8f0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: #f1f5f9;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cbc-designer-tab:hover {
    background: #e2e8f0;
}

.cbc-designer-tab.active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

/* =============================================
   Summary Items (multi-banner)
   ============================================= */
.cbc-summary-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 12px;
    background: #fafbfc;
}

.cbc-summary-item-preview {
    flex-shrink: 0;
    width: 140px;
}

.cbc-summary-thumb {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.cbc-no-design-small {
    display: block;
    padding: 30px 10px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 6px;
    border: 1px dashed #d1d5db;
}

.cbc-summary-item-details {
    flex: 1;
    min-width: 0;
}

.cbc-summary-item-details h4 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1a73e8;
}

.cbc-summary-table-sm {
    width: 100%;
    border-collapse: collapse;
}

.cbc-summary-table-sm td {
    padding: 4px 8px;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}

.cbc-summary-table-sm td:first-child {
    color: #64748b;
    width: 35%;
}

.cbc-summary-totals {
    margin: 20px 0;
}

/* Loading */
.cbc-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.cbc-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: cbc-spin 0.8s linear infinite;
}

@keyframes cbc-spin {
    to { transform: rotate(360deg); }
}

.cbc-loading p {
    margin-top: 16px;
    font-size: 15px;
    color: #475569;
    font-weight: 500;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 768px) {
    .cbc-wrapper {
        padding: 12px;
    }

    .cbc-panel {
        padding: 20px 16px;
    }

    .cbc-steps {
        flex-wrap: wrap;
        gap: 4px;
    }

    .cbc-step-line {
        width: 30px;
    }

    .cbc-step-label {
        display: none;
    }

    .cbc-dimensions-row {
        flex-direction: column;
    }

    .cbc-field-separator {
        display: none;
    }

    .cbc-type-grid,
    .cbc-grommet-options {
        grid-template-columns: 1fr;
    }

    .cbc-designer-layout {
        grid-template-columns: 1fr;
    }

    .cbc-designer-toolbar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .cbc-tool-group {
        flex: 1;
        min-width: 140px;
    }

    .cbc-templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cbc-summary-item {
        flex-direction: column;
    }

    .cbc-summary-item-preview {
        width: 100%;
    }

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

    .cbc-actions {
        flex-direction: column;
    }

    .cbc-btn {
        width: 100%;
        justify-content: center;
    }
}
