/* CB Portal - Thinkific Bridge Frontend Styles */

/* Reset and base styles */
.cbp-catalog,
.cbp-course-single,
.cbp-dashboard {
    box-sizing: border-box;
}

.cbp-catalog *,
.cbp-course-single *,
.cbp-dashboard * {
    box-sizing: inherit;
}

/* Button styles */
.cbp-button,
.cbp-enroll-button,
.cbp-learning-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    line-height: 1.2;
}

.cbp-button-primary {
    background-color: #0073aa;
    color: white;
}

.cbp-button-primary:hover {
    background-color: #005a87;
    color: white;
    transform: translateY(-1px);
}

.cbp-button-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.cbp-button-secondary:hover {
    background-color: #e0e0e0;
    color: #333;
    border-color: #ccc;
}

.cbp-button-success {
    background-color: #28a745;
    color: white;
}

.cbp-button-success:hover {
    background-color: #218838;
    color: white;
}

/* Loading states */
.cbp-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cbp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: cbp-spin 1s linear infinite;
}

@keyframes cbp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive utilities */
.cbp-hide-mobile {
    display: block;
}

.cbp-hide-desktop {
    display: none;
}

@media (max-width: 768px) {
    .cbp-hide-mobile {
        display: none;
    }
    
    .cbp-hide-desktop {
        display: block;
    }
}

/* Progress bars */
.cbp-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.cbp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007cba 0%, #0096dc 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Badges and status indicators */
.cbp-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cbp-badge-success {
    background: #d4edda;
    color: #155724;
}

.cbp-badge-warning {
    background: #fff3cd;
    color: #856404;
}

.cbp-badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Forms */
.cbp-form-group {
    margin-bottom: 1rem;
}

.cbp-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.cbp-form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.cbp-form-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Alerts and notices */
.cbp-alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.cbp-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cbp-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cbp-alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.cbp-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Grid system */
.cbp-row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.5rem;
}

.cbp-col {
    flex: 1;
    padding: 0.5rem;
}

.cbp-col-1 { flex: 0 0 8.333%; }
.cbp-col-2 { flex: 0 0 16.666%; }
.cbp-col-3 { flex: 0 0 25%; }
.cbp-col-4 { flex: 0 0 33.333%; }
.cbp-col-6 { flex: 0 0 50%; }
.cbp-col-8 { flex: 0 0 66.666%; }
.cbp-col-9 { flex: 0 0 75%; }
.cbp-col-12 { flex: 0 0 100%; }

/* Spacing utilities */
.cbp-mt-1 { margin-top: 0.5rem; }
.cbp-mt-2 { margin-top: 1rem; }
.cbp-mt-3 { margin-top: 1.5rem; }
.cbp-mt-4 { margin-top: 2rem; }

.cbp-mb-1 { margin-bottom: 0.5rem; }
.cbp-mb-2 { margin-bottom: 1rem; }
.cbp-mb-3 { margin-bottom: 1.5rem; }
.cbp-mb-4 { margin-bottom: 2rem; }

.cbp-pt-1 { padding-top: 0.5rem; }
.cbp-pt-2 { padding-top: 1rem; }
.cbp-pt-3 { padding-top: 1.5rem; }
.cbp-pt-4 { padding-top: 2rem; }

.cbp-pb-1 { padding-bottom: 0.5rem; }
.cbp-pb-2 { padding-bottom: 1rem; }
.cbp-pb-3 { padding-bottom: 1.5rem; }
.cbp-pb-4 { padding-bottom: 2rem; }

/* Text utilities */
.cbp-text-center { text-align: center; }
.cbp-text-left { text-align: left; }
.cbp-text-right { text-align: right; }

.cbp-text-muted { color: #666; }
.cbp-text-primary { color: #0073aa; }
.cbp-text-success { color: #28a745; }
.cbp-text-warning { color: #ffc107; }
.cbp-text-danger { color: #dc3545; }

/* Animations */
.cbp-fade-in {
    animation: cbp-fadeIn 0.3s ease-in;
}

@keyframes cbp-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cbp-slide-up {
    animation: cbp-slideUp 0.3s ease-out;
}

@keyframes cbp-slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}
