/* Frontend CSS */
.ttpc-buy-now-btn {
    margin-top: 10px;
    margin-bottom: 10px;
    background-color: var(--ttpc-btn-bg);
    color: var(--ttpc-btn-color);
    border-radius: var(--ttpc-btn-radius);
    font-size: var(--ttpc-btn-font-size);
    padding: var(--ttpc-btn-pad-y) var(--ttpc-btn-pad-x);
    font-family: var(--ttpc-font);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}
.ttpc-buy-now-btn:hover {
    background-color: var(--ttpc-btn-hover-bg);
    color: var(--ttpc-btn-hover-color);
}
.ttpc-modal-wrapper {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ttpc-font);
}
.ttpc-modal-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--ttpc-overlay-color);
    backdrop-filter: blur(var(--ttpc-overlay-blur));
}
.ttpc-modal-content {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: var(--ttpc-popup-width);
    border-radius: var(--ttpc-popup-radius);
    box-shadow: var(--ttpc-popup-shadow);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 10;
}
.ttpc-modal-header {
    background: var(--ttpc-header-bg);
    color: var(--ttpc-header-color);
    padding: var(--ttpc-header-padding);
    border-radius: var(--ttpc-popup-radius) var(--ttpc-popup-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ttpc-modal-title {
    margin: 0;
    font-size: var(--ttpc-header-font-size);
    color: var(--ttpc-header-color);
}
.ttpc-modal-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
}
.ttpc-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}
.ttpc-modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}
.ttpc-place-order-btn {
    width: 100%;
    background: var(--ttpc-place-bg);
    color: var(--ttpc-place-color);
    border: none;
    border-radius: var(--ttpc-place-radius);
    padding: var(--ttpc-place-pad-y) 0;
    font-size: var(--ttpc-place-font-size);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.ttpc-place-order-btn:hover {
    background: var(--ttpc-place-hover-bg);
}

/* Animations */
@keyframes ttpc-anim-slide_down {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes ttpc-anim-pulse_glow {
    0% { box-shadow: 0 0 0 0 rgba(var(--ttpc-btn-bg), 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(var(--ttpc-btn-bg), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--ttpc-btn-bg), 0); }
}

/* Field Styles */
.ttpc-checkout-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.ttpc-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}
.ttpc-field-group.half {
    width: calc(50% - 10px);
    display: inline-flex;
}
.ttpc-field-label {
    font-size: var(--ttpc-field-label-size);
    color: var(--ttpc-body-color);
}
.ttpc-input {
    height: var(--ttpc-field-height);
    border: 1px solid var(--ttpc-field-border);
    border-radius: var(--ttpc-field-radius);
    padding: 0 15px;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.ttpc-input:focus {
    outline: none;
    border-color: var(--ttpc-field-focus);
}

/* Skeleton loader */
.ttpc-loader-skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
}
.ttpc-skeleton-line {
    height: 15px;
    margin-bottom: 10px;
    background: #e2e8f0;
    border-radius: 4px;
}
.ttpc-skeleton-line.title {
    height: 25px;
    width: 50%;
    margin-bottom: 20px;
}
@keyframes skeleton-loading {
    0% { background-color: hsl(200, 20%, 80%); }
    100% { background-color: hsl(200, 20%, 95%); }
}

/* Order Bump */
.ttpc-bump-wrapper {
    border: 2px dashed #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    background: #f8fafc;
    margin: 15px 0;
    display: flex;
    gap: 15px;
    align-items: center;
}
.ttpc-bump-checkbox {
    transform: scale(1.5);
}

/* Countdown */
.ttpc-countdown-container {
    background: var(--ttpc-countdown-bg);
    color: var(--ttpc-countdown-color);
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}
.ttpc-countdown-timer span {
    background: #fff;
    color: var(--ttpc-countdown-color);
    padding: 4px 8px;
    border-radius: 4px;
    margin: 0 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Mobile Responsive & Sticky Button */
@media (max-width: 768px) {
    .ttpc-modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    .ttpc-modal-header {
        border-radius: 0;
    }
    .ttpc-field-group.half {
        width: 100%;
    }
    .ttpc-modal-footer {
        position: sticky;
        bottom: 0;
        background: #fff;
        z-index: 20;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
    }
}
