/**
 * TBB CTA Manager - Frontend Styles
 */

/* Grid Container */
.tbb-cta-grid {
    display: grid;
    gap: 30px;
    margin: 40px 0;
}

/* Default: 3 columns */
.tbb-cta-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.tbb-cta-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.tbb-cta-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* CTA Item */
.tbb-cta-item {
    background-color: #e0e8a4;
    padding: 40px 30px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-height: 450px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tbb-cta-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* CTA Content */
.tbb-cta-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Title - Fixed Size */
.tbb-cta-title {
    font-size: 24px !important;
    line-height: 1.3em !important;
    margin: 0 0 15px 0 !important;
    font-weight: 600 !important;
    color: #646467 !important;
    min-height: 62px;
    display: flex;
    align-items: center;
}

/* Price */
.tbb-cta-price {
    font-size: 28px;
    margin: 0 0 20px 0;
    color: #646467;
}

.tbb-cta-price strong {
    font-weight: 700;
}

/* Description */
.tbb-cta-description {
    flex: 1;
    margin-bottom: 25px;
    color: #646467;
    font-size: 16px;
    line-height: 1.6em;
}

.tbb-cta-description p {
    margin: 0 0 10px 0;
}

.tbb-cta-description p:last-child {
    margin-bottom: 0;
}

/* Buttons Container */
.tbb-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

/* Button Styles - Match your site */
.tbb-cta-button {
    display: inline-block;
    padding: 20px 30px;
    font-family: inherit;
    font-weight: 600;
    font-size: 12px;
    line-height: 1em;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    text-align: center;
    border: 2px solid;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

/* Primary Button - Teal */
.tbb-cta-button-primary {
    background-color: #45a0ab;
    color: #fff;
    border-color: #45a0ab;
}

.tbb-cta-button-primary:hover {
    background-color: #ffffff;
    color: #45a0ab;
    border-color: #45a0ab;
}

/* Secondary Button - Outlined */
.tbb-cta-button-secondary {
    background-color: transparent;
    color: #45a0ab;
    border-color: #45a0ab;
}

.tbb-cta-button-secondary:hover {
    background-color: #45a0ab;
    color: #ffffff;
}

/* Modal Overlay */
.tbb-cta-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tbb-cta-modal-overlay.active {
    opacity: 1;
}

/* Modal */
.tbb-cta-modal {
    background: #fff;
    border-radius: 8px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.tbb-cta-modal-overlay.active .tbb-cta-modal {
    transform: scale(1);
}

/* Modal Close Button */
.tbb-cta-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #646467;
    cursor: pointer;
    padding: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tbb-cta-modal-close:hover {
    background: #f0f0f0;
    color: #000;
}

/* Modal Content */
.tbb-cta-modal-body h2 {
    font-size: 32px;
    margin: 0 0 15px 0;
    color: #45a0ab;
}

.tbb-cta-modal-price {
    font-size: 28px;
    margin: 0 0 25px 0;
    color: #646467;
}

.tbb-cta-modal-description {
    margin-bottom: 30px;
    color: #646467;
    font-size: 16px;
    line-height: 1.7em;
}

.tbb-cta-modal-description p {
    margin-bottom: 15px;
}

.tbb-cta-modal-description ul,
.tbb-cta-modal-description ol {
    margin: 15px 0;
    padding-left: 25px;
}

.tbb-cta-modal-description li {
    margin-bottom: 8px;
}

.tbb-cta-modal-body .tbb-cta-button {
    width: auto;
    min-width: 200px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tbb-cta-grid[data-columns="3"],
    .tbb-cta-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tbb-cta-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .tbb-cta-item {
        min-height: 400px;
        padding: 30px 20px;
    }
    
    .tbb-cta-title {
        font-size: 20px !important;
        min-height: auto;
    }
    
    .tbb-cta-modal {
        padding: 30px 20px;
        max-height: 95vh;
    }
    
    .tbb-cta-modal-body h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .tbb-cta-button {
        font-size: 11px;
        padding: 15px 20px;
    }
    
    .tbb-cta-modal-close {
        font-size: 28px;
        width: 35px;
        height: 35px;
    }
}

/* Scrollbar for modal */
.tbb-cta-modal::-webkit-scrollbar {
    width: 8px;
}

.tbb-cta-modal::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.tbb-cta-modal::-webkit-scrollbar-thumb {
    background: #45a0ab;
    border-radius: 4px;
}

.tbb-cta-modal::-webkit-scrollbar-thumb:hover {
    background: #3a8a94;
}

/* Placeholder for sortable */
.tbb-cta-sortable-placeholder {
    background: #f0f0f0;
    border: 2px dashed #45a0ab;
    visibility: visible !important;
    height: 60px;
    margin-bottom: 10px;
}

