@font-face {
    font-family: 'Outfit';
    src: url('OutfitLight1.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('OutfitRegular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('OutfitSemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('OutfitSemiBold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   1. Admin Settings Page Styles
   ========================================================================== */
.ccc-settings-wrap {
    font-family: 'Outfit', sans-serif;
    max-width: 800px;
    margin-top: 30px;
}
.ccc-settings-card {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}
.ccc-settings-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
}
.ccc-settings-row {
    margin-bottom: 25px;
}
.ccc-settings-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
}
.ccc-settings-row input[type="text"] {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
}
.ccc-settings-row p.description {
    margin-top: 8px;
    color: #64748b;
    font-style: italic;
}
.ccc-save-btn {
    background: #3b82f6 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.2s;
}
.ccc-save-btn:hover {
    background: #2563eb !important;
}

/* ==========================================================================
   2. Template Picker Screen Styles
   ========================================================================== */
.ccc-picker-container {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
}
.ccc-picker-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}
.ccc-picker-header p {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 50px;
}
.ccc-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.ccc-template-card {
    background: #fff;
    border-radius: 24px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ccc-template-card:hover {
    transform: translateY(-10px);
    border-color: #3b82f6;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}
.ccc-template-preview {
    width: 100%;
    height: 420px;
    border-radius: 16px;
    background: #f1f5f9;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.ccc-template-info {
    padding: 10px 10px 20px;
}
.ccc-template-info h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}
.ccc-template-info p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px;
}
.ccc-select-btn {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.ccc-template-card:hover .ccc-select-btn {
    background: #2563eb;
    transform: scale(1.05);
}

/* Picker Template Previews */
.preview-01 {
    background: #3ca099;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}
.p01-header {
    background: linear-gradient(135deg, #0f766e, #134e4a);
    width: 100%;
    height: 120px;
    margin: -20px -20px 20px;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.p01-logo {
    width: 100px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}
.p01-text {
    width: 80%;
    height: 15px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    margin-bottom: 10px;
}
.p01-text.small {
    width: 50%;
    height: 10px;
}
.p01-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    margin-bottom: 20px;
}
.p01-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.preview-02 {
    background: #1e293b;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 40px 30px;
    box-sizing: border-box;
    text-align: left;
}
.p02-logo {
    width: 120px;
    height: 40px;
    background: #3b82f6;
    border-radius: 8px;
    margin-bottom: 40px;
}
.p02-text {
    width: 100%;
    height: 25px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 15px;
}
.p02-text.mid {
    width: 70%;
    height: 15px;
    background: rgba(255, 255, 255, 0.5);
}
.p02-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.p02-links {
    display: flex;
    gap: 8px;
}
.p02-link {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

/* ==========================================================================
   3. Analytics Meta Box Styles
   ========================================================================== */
.ccc-analytics-box {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.ccc-analytics-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.ccc-analytics-stat {
    flex: 1;
    min-width: 60px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 8px 8px;
    text-align: center;
}
.ccc-analytics-stat.inactive {
    opacity: 0.4;
}
.ccc-analytics-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #94a3b8;
    margin-bottom: 4px;
    font-weight: 600;
}
.ccc-analytics-count {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}
.ccc-analytics-total {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}
.ccc-analytics-reset {
    background: none;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s;
}
.ccc-analytics-reset:hover {
    background: #fef2f2;
}

/* ==========================================================================
   4. Admin Post Editor (Meta Box & Live Preview)
   ========================================================================== */
.ccc-meta-container { 
    display: flex; 
    gap: 40px; 
    align-items: flex-start; 
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1100px) {
    .ccc-meta-container { flex-direction: column-reverse; align-items: stretch; }
    .ccc-preview-column { position: relative !important; top: 0 !important; width: 100% !important; flex: none !important; margin-bottom: 30px; }
}

.ccc-settings-column { flex: 1; }

.ccc-preview-column { 
    flex: 0 0 450px; 
    position: sticky; 
    top: 50px; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9); 
    padding: 50px 20px; 
    border-radius: 24px; 
    border: 1px solid #e2e8f0; 
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
}

.ccc-meta-row { margin-bottom: 25px; }
.ccc-meta-row label { display: block; font-weight: 600; margin-bottom: 8px; color: #1e293b; font-size: 14px; }
.ccc-meta-row input[type='text'], .ccc-meta-row input[type='url'], .ccc-meta-row textarea { 
    width: 100%; padding: 12px 16px; border-radius: 10px; border: 1px solid #cbd5e1; 
    background-color: #fff; transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-size: 14px;
}
.ccc-meta-row input:focus, .ccc-meta-row textarea:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 4px rgba(59,130,246,0.1); }

.ccc-meta-row .ccc-action-group { 
    display: flex; align-items: center; gap: 12px; margin-bottom: 12px; 
    background: #fff; padding: 14px; border-radius: 12px; border: 1px solid #e2e8f0;
    transition: all 0.2s;
}
.ccc-meta-row .ccc-action-group:hover { border-color: #3b82f6; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.ccc-meta-row .ccc-action-group input[type='url'] { flex-grow: 1; font-size: 13px; margin: 0; }

.ccc-label-with-side { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ccc-label-with-side label { margin-bottom: 0; }
.ccc-font-size-control { font-size: 12px; color: #64748b; display: flex; align-items: center; gap: 5px; }
.ccc-font-size-control input { width: 45px !important; padding: 4px 6px !important; font-size: 11px !important; height: auto !important; }

.ccc-bg-controls, .ccc-overlay-controls { 
    display: flex; gap: 15px; background: #fff; padding: 15px; border-radius: 12px; border: 1px solid #e2e8f0; align-items: center;
}
.ccc-mini-label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: #94a3b8; margin-bottom: 5px; font-weight: 700; }

.ccc-bg-image-field, .ccc-bg-video-field { position: relative; }
.ccc-image-dropzone { 
    width: 60px; height: 60px; background: #f1f5f9; border: 2px dashed #cbd5e1; border-radius: 10px; 
    display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 5px;
}
.ccc-image-dropzone img, .ccc-image-dropzone video { width: 100%; height: 100%; object-fit: cover; }
.ccc-image-dropzone span { font-size: 24px; color: #94a3b8; }

#ccc_bg_remove_btn, #ccc_bg_video_remove_btn { position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; border-radius: 50%; padding: 0; line-height: 1; min-width: 0; z-index: 10; }

.ccc-overlay-opacity-field { flex-grow: 1; }
.ccc-overlay-opacity-field input { width: 100%; }

.ccc-logo-settings { display: flex; gap: 20px; align-items: flex-start; background: #fff; padding: 15px; border-radius: 12px; border: 1px solid #e2e8f0; }
.ccc-logo-color-field { flex: 1; }

/* Shortcode Field Styling */
.ccc-shortcode-row {
    background: #f0f9ff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #bae6fd;
    margin-bottom: 30px !important;
}
.ccc-shortcode-input-wrapper {
    display: flex;
    gap: 10px;
}
#ccc_shortcode_display {
    flex-grow: 1;
    background: #fff;
    font-family: monospace;
    font-size: 14px;
    font-weight: 600;
    color: #0369a1;
}
#ccc_copy_shortcode {
    display: flex;
    align-items: center;
    gap: 5px;
    height: auto;
    padding: 0 15px;
}

/* Premium Device Mockup */
.ccc-device-mockup {
    width: 320px;
    height: 640px;
    background: #111;
    padding: 10px;
    position: relative;
    border: 4px solid #333;
    outline: 1px solid rgba(255,255,255,0.1);
}

.ccc-device-screen {
    width: 100%;
    height: 100%;
    background: #fff;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.ccc-device-status-bar {
    display: none;
}
.ccc-status-icons { display: none; }

#ccc-live-preview {
    flex: 1;
    display: flex; 
    flex-direction: column;
    align-items: center; 
    padding: 24px; 
    color: #fff;
    font-family: 'Outfit', sans-serif !important;
    text-align: center; 
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background-size: cover;
    background-position: center;
    container-type: inline-size;
}

#ccc-live-preview * {
    box-sizing: border-box;
}

#ccc-preview-footer-section {
    margin: 30px -30px 0;
    padding: 20px 20px;
    width: calc(100% + 60px);
    z-index: 2;
    position: relative;
    box-sizing: border-box;
}

#ccc-preview-header-section {
    margin: -24px -24px 30px;
    padding: 0px 20px 20px;
    width: calc(100% + 48px);
    z-index: 2;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background 0.3s ease;
}

.ccc-header-wave {
    display: none;
}

#ccc-preview-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: all 0.3s ease;
}

.ccc-preview-logo {
    width: 100%; 
    max-width: 250px;
    margin-bottom: 0; 
    display: flex; align-items: center;
    justify-content: center; 
    z-index: 3;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.ccc-preview-logo img { 
    max-width: 100%; 
    max-height: 120px; 
    object-fit: contain; 
    border-radius: 0 !important;
    display: block;
}
.ccc-preview-main-text { 
    font-size: clamp(16px, 6cqw, 32px); font-weight: 700; margin-bottom: 12px; line-height: 1.2; 
    white-space: pre-wrap; text-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2;
    max-width: 100%;
    word-break: keep-all;
    overflow-wrap: normal;
}
.ccc-preview-fine-print { 
    font-size: clamp(10px, 4cqw, 16px); 
    opacity: 0.9; 
    margin-bottom: 40px; 
    font-weight: 400; 
    line-height: 1.5;
    z-index: 2;
    max-width: 100%;
    word-break: keep-all;
    overflow-wrap: normal;
}

.ccc-preview-actions { 
    display: flex; 
    gap: 16px; 
    margin-top: auto; 
    padding-bottom: 10px;
    z-index: 2;
}

.ccc-preview-action-btn {
    width: 60px; height: 60px; 
    background: rgba(255,255,255,0.15); 
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 16px -4px rgba(0,0,0,0.1);
}
.ccc-preview-action-btn:hover { 
    transform: translateY(-8px) scale(1.05); 
    background: rgba(255,255,255,0.25); 
    border-color: rgba(255,255,255,0.4); 
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.2);
}
.ccc-preview-action-btn svg { width: 40px; height: 40px; fill: #fff; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
.ccc-preview-action-btn.hidden { display: none; }

.ccc-preview-custom-btn {
    width: auto !important;
    padding: 0 5px;
    min-width: 60px;
}
.ccc-custom-btn-text {
    font-weight: 600;
    font-size: clamp(10px, 3.5cqw, 14px);
    color: #fff;
    text-align: center;
    word-break: keep-all;
    overflow-wrap: normal;
}

.ccc-preview-footer-text {
    font-size: clamp(8px, 3cqw, 12px);
    opacity: 0.7;
    z-index: 2;
    position: relative;
    width: 100%;
    word-break: keep-all;
    overflow-wrap: normal;
}

.ccc-logo-preview-thumb { margin-top: 10px; max-width: 150px; height: auto; border-radius: 0 !important; border: 1px solid #e2e8f0; padding: 4px; background: #fff; display: block; }

#ccc_logo_remove_btn { color: #dc2626; border-color: #fca5a5; background: #fff; }
#ccc_logo_remove_btn:hover { background: #fef2f2; border-color: #f87171; }

.ccc-template-wrapper {
    display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; 
    z-index: 2; position: relative; padding: 0; box-sizing: border-box;
}

.ccc-visibility-control { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #64748b; }
.ccc-visibility-control input { margin: 0; }
.ccc-preview-hidden { display: none !important; }

/* Admin columns width script */
.column-ccc_cta_clicks { width: 140px; }

/* ==========================================================================
   5. Frontend Contact Card Styles
   ========================================================================== */
.ccc-card {
    background-color: var(--bg-color, #3ca099);
    background-image: var(--bg-image, none);
    background-size: cover;
    background-position: center;
    padding: 24px;
    color: #fff;
    font-family: 'Outfit', sans-serif !important;
    text-align: center;
    width: 100% !important;
    min-height: 100%;
    max-width: 100% !important;
    margin: 0 !important;
    flex: 1 1 auto;
    align-self: stretch;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    container-type: inline-size;
}

.ccc-card * {
    box-sizing: border-box;
}

.ccc-card .ccc-template-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    min-height: 100%;
    z-index: 2;
    position: relative;
    padding: 0;
    box-sizing: border-box;
}

.ccc-card .ccc-card-section-header {
    width: 100%;
    flex-shrink: 0;
}

.ccc-card .ccc-card-section-middle {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 0;
    z-index: 2;
    position: relative;
}

.ccc-card .ccc-card-section-footer {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 2;
    position: relative;
}

.ccc-card .ccc-card-overlay {
    position: absolute;
    inset: 0;
    background-color: var(--overlay-color, #000000);
    opacity: var(--overlay-opacity, 0.3);
    z-index: 1;
}

.ccc-card .ccc-card-header {
    margin: -24px -24px 0;
    padding: 0px 20px 20px;
    background: var(--header-bg, linear-gradient(135deg, #0f766e, #134e4a));
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ccc-card .ccc-card-logo {
    width: 100%;
    max-width: 220px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    position: relative;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.ccc-card .ccc-card-logo img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    border-radius: 0 !important;
    display: block;
}

.ccc-card .ccc-card-main-text {
    font-size: var(--main-font-size, 24px) !important;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.1;
    color: #fff !important;
    z-index: 2;
    position: relative;
    max-width: 100%;
    word-break: break-word;
}

.ccc-card .ccc-card-fine-print {
    font-size: var(--fine-font-size, 16px) !important;
    color: #fff !important;
    opacity: 0.9;
    margin-bottom: 15px;
    line-height: 1.3;
    z-index: 2;
    position: relative;
    word-break: break-word;
    max-width: 100%;
}

.ccc-card .ccc-card-footer-section {
    background-color: var(--footer-bg-color, transparent);
    margin: 0 -24px -24px;
    padding: 10px;
    width: calc(100% + 48px);
    z-index: 2;
    position: relative;
}

.ccc-card .ccc-card-footer-text {
    font-size: var(--footer-font-size, 12px);
    opacity: 0.7;
    line-height: 1.4;
    word-break: break-word;
}

.ccc-card .ccc-card-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 2;
    position: relative;
}

.ccc-card .ccc-card-action-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    text-decoration: none;
}

.ccc-card .ccc-card-action-btn:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
}

.ccc-card .ccc-card-action-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.ccc-card .ccc-card-custom-btn {
    width: auto !important;
    padding: 0 5px;
    min-width: 50px;
    color: #fff;
    font-weight: 600;
    font-size: clamp(10px, 3.5cqw, 14px);
    text-align: center;
    word-break: break-word;
}

@media (max-width: 600px) {
    .ccc-card .ccc-card-main-text {
        font-size: var(--main-font-size-mobile, 16px) !important;
    }
    .ccc-card .ccc-card-fine-print {
        font-size: var(--fine-font-size-mobile, 10px) !important;
    }
    .ccc-card .ccc-card-footer-text {
        font-size: var(--footer-font-size-mobile, 8px) !important;
    }
}

/* ==========================================================================
   6. Bricks Builder Compatibility Styles
   ========================================================================== */
.ux-loop-cta.brxe-block {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
}
.ux-loop-cta.brxe-block > .ccc-card-wrapper {
    flex: 1;
    display: flex;
}

/* ==========================================================================
   7. Template Specific Styles
   ========================================================================== */

/* Template 2: Minimal Dark Layout */
.ccc-template-2 {
    background-color: #1e293b !important;
}

.ccc-template-2 .ccc-card-header,
.ccc-template-2 #ccc-preview-header-section {
    clip-path: none !important;
    border-radius: 0;
    background: transparent !important;
    padding: 40px 24px 20px !important;
}

.ccc-template-2 .ccc-card-section-middle {
    padding: 24px 24px 16px !important;
}

.ccc-template-2 .ccc-card-section-footer,
.ccc-template-2 .ccc-preview-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px !important;
    margin-top: auto;
    width: calc(100% - 48px);
    margin-left: 24px;
    margin-right: 24px;
    box-sizing: border-box;
}

.ccc-template-2 .ccc-card-footer-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: transparent !important;
    margin-top: 20px !important;
}
