/* ==========================================================================
   Countdown Timer on Download Button - Elementor Addon Stylesheet
   ========================================================================== */

.ctdb-widget-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
    box-sizing: border-box;
}

/* Alignment Classes */
.elementor-align-left .ctdb-widget-container {
    align-items: flex-start;
}
.elementor-align-center .ctdb-widget-container {
    align-items: center;
}
.elementor-align-right .ctdb-widget-container {
    align-items: flex-end;
}
.elementor-align-justify .ctdb-widget-container {
    align-items: stretch;
}
.elementor-align-justify .ctdb-button-wrapper,
.elementor-align-justify .ctdb-button {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Timer Styles
   -------------------------------------------------------------------------- */
.ctdb-timer-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    color: #1e293b;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: all 0.4s ease;
}

.ctdb-timer-text-content {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.ctdb-timer-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #2563eb;
    font-size: 18px;
    min-width: 24px;
    letter-spacing: -0.5px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ctdb-timer-num.pulse {
    transform: scale(1.22);
}

/* Circular Progress Style */
.ctdb-style-circular {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 28px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    border: 1px solid #edf2f7;
}

.ctdb-circular-wrapper {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ctdb-circle-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ctdb-progress-bg {
    stroke: #e2e8f0;
}

.ctdb-progress-bar {
    stroke: #2563eb;
    stroke-dasharray: 276.46;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.8s linear;
}

.ctdb-style-circular .ctdb-timer-num {
    font-size: 15px;
    font-weight: 800;
    color: #2563eb;
    position: relative;
    z-index: 2;
}

/* Pill Style */
.ctdb-style-pill {
    border-radius: 9999px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    padding: 10px 24px;
}

.ctdb-style-pill .ctdb-timer-num {
    background: #2563eb;
    color: #ffffff !important;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 14px;
}

/* Minimal Style */
.ctdb-style-minimal {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 8px 0;
}

/* Card Style */
.ctdb-style-card {
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    flex-direction: column;
    padding: 20px 30px;
}

.ctdb-style-card .ctdb-timer-num {
    font-size: 32px;
    margin-bottom: 4px;
}

/* --------------------------------------------------------------------------
   Button Container & Button Styles
   -------------------------------------------------------------------------- */
.ctdb-button-wrapper {
    display: none;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.ctdb-button-wrapper.ctdb-active {
    display: inline-flex;
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: ctdbPopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Elementor Editor Preview Mode */
.ctdb-editor-preview-mode .ctdb-button-wrapper {
    display: inline-flex !important;
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    margin-top: 15px;
}

/* The Download Button */
.ctdb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    padding: 14px 30px;
    font-size: 16px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.ctdb-button:hover {
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
    transform: translateY(-2px);
}

.ctdb-button:active {
    transform: translateY(1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.ctdb-button-content-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.ctdb-button-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.ctdb-button-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.ctdb-align-icon-left {
    margin-right: 10px;
}

.ctdb-align-icon-right {
    margin-left: 10px;
}

/* Sizes */
.elementor-size-xs {
    padding: 8px 16px;
    font-size: 12px;
}
.elementor-size-sm {
    padding: 10px 20px;
    font-size: 14px;
}
.elementor-size-md {
    padding: 14px 28px;
    font-size: 16px;
}
.elementor-size-lg {
    padding: 18px 36px;
    font-size: 18px;
}
.elementor-size-xl {
    padding: 22px 46px;
    font-size: 20px;
}

/* Preset Types */
.ctdb-button-info .ctdb-button {
    background-color: #0284c7;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.25);
}
.ctdb-button-info .ctdb-button:hover {
    background-color: #0369a1;
}

.ctdb-button-success .ctdb-button {
    background-color: #10b981;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}
.ctdb-button-success .ctdb-button:hover {
    background-color: #059669;
}

.ctdb-button-warning .ctdb-button {
    background-color: #f59e0b;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
}
.ctdb-button-warning .ctdb-button:hover {
    background-color: #d97706;
}

.ctdb-button-danger .ctdb-button {
    background-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.25);
}
.ctdb-button-danger .ctdb-button:hover {
    background-color: #dc2626;
}

/* Glow Effect */
.ctdb-btn-glow {
    position: relative;
}
.ctdb-btn-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
    opacity: 0;
    animation: ctdbGlowPulse 2s infinite;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Step 2 Locked State (Waiting for Step 1)
   -------------------------------------------------------------------------- */
.ctdb-step2-locked-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 50px;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ctdb-step2-locked-box .ctdb-locked-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Animations */
@keyframes ctdbPopIn {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.9);
    }
    70% {
        opacity: 1;
        transform: translateY(-2px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ctdbGlowPulse {
    0% {
        opacity: 0.3;
        transform: scale(0.98);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.03);
    }
    100% {
        opacity: 0.3;
        transform: scale(0.98);
    }
}
