/**
 * Frontend Styles
 *
 * @package Business2
 * @since 1.0.0
 */

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
    --b2-primary: #2271b1;
    --b2-primary-dark: #135e96;
    --b2-success: #00a32a;
    --b2-danger: #d63638;
    --b2-warning: #dba617;
    --b2-info: #72aee6;
    --b2-gray-100: #f6f7f7;
    --b2-gray-200: #dcdcde;
    --b2-gray-300: #c3c4c7;
    --b2-gray-800: #2c3338;
    --b2-radius: 8px;
    --b2-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --b2-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
.b2-widget {
    padding: 30px;
    background: #fff;
    border-radius: var(--b2-radius);
    box-shadow: var(--b2-shadow);
}

.b2-widget-title {
    margin: 0 0 24px;
    font-size: 28px;
    font-weight: 600;
    color: var(--b2-gray-800);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.b2-form-group {
    margin-bottom: 20px;
}

.b2-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--b2-gray-800);
}

.b2-form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--b2-gray-300);
    border-radius: var(--b2-radius);
    transition: all 0.2s;
}

.b2-form-control:focus {
    outline: none;
    border-color: var(--b2-primary);
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.b2-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.b2-form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.b2-form-checkbox input[type="checkbox"] {
    width: auto;
}

.b2-form-hint {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--b2-gray-300);
}

.b2-form-message {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: var(--b2-radius);
    display: none;
}

.b2-form-message.success {
    display: block;
    background: #e7f5e7;
    color: var(--b2-success);
    border-left: 4px solid var(--b2-success);
}

.b2-form-message.error {
    display: block;
    background: #f9e5e5;
    color: var(--b2-danger);
    border-left: 4px solid var(--b2-danger);
}

.required {
    color: var(--b2-danger);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.b2-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--b2-radius);
    cursor: pointer;
    transition: all 0.2s;
}

.b2-btn-primary {
    background: var(--b2-primary);
    color: #fff;
}

.b2-btn-primary:hover {
    background: var(--b2-primary-dark);
}

.b2-btn-secondary {
    background: var(--b2-gray-200);
    color: var(--b2-gray-800);
}

.b2-btn-secondary:hover {
    background: var(--b2-gray-300);
}

.b2-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.b2-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   Dashboard
   ========================================================================== */
.b2-dashboard-welcome {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--b2-gray-200);
}

.b2-dashboard-welcome h2 {
    margin: 0 0 8px;
    font-size: 32px;
    color: var(--b2-gray-800);
}

.b2-dashboard-subtitle {
    margin: 0;
    font-size: 16px;
    color: var(--b2-gray-300);
}

.b2-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.b2-stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--b2-gray-100);
    border-radius: var(--b2-radius);
}

.b2-stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--b2-primary);
    background: #fff;
    border-radius: 50%;
}

.b2-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--b2-gray-800);
}

.b2-stat-label {
    font-size: 13px;
    color: var(--b2-gray-300);
}

.b2-dashboard-section {
    margin-top: 32px;
}

.b2-dashboard-section h3 {
    margin: 0 0 20px;
    font-size: 20px;
    color: var(--b2-gray-800);
}

.b2-consultations-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.b2-consultation-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--b2-gray-100);
    border-radius: var(--b2-radius);
    border-left: 4px solid var(--b2-gray-300);
}

.b2-consultation-card.upcoming {
    border-left-color: var(--b2-primary);
}

.b2-consultation-date {
    flex-shrink: 0;
    width: 60px;
    text-align: center;
}

.date-day {
    font-size: 28px;
    font-weight: 700;
    color: var(--b2-gray-800);
}

.date-month {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--b2-gray-300);
}

.b2-consultation-details {
    flex: 1;
}

.b2-consultation-time {
    font-size: 15px;
    font-weight: 500;
    color: var(--b2-gray-800);
    margin-bottom: 4px;
}

.separator {
    margin: 0 8px;
    color: var(--b2-gray-300);
}

.b2-consultation-consultant {
    margin-bottom: 8px;
    color: var(--b2-gray-300);
}

.b2-consultation-type {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.b2-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.b2-badge.video {
    background: #e7f1ff;
    color: var(--b2-primary);
}

.b2-badge.phone {
    background: #e7f5e7;
    color: var(--b2-success);
}

/* ==========================================================================
   Booking Widget
   ========================================================================== */
.b2-booking-step {
    display: none;
}

.b2-booking-step.b2-step-active {
    display: block;
}

.b2-step-title {
    margin: 0 0 24px;
    font-size: 20px;
    color: var(--b2-gray-800);
}

.b2-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.b2-service-card {
    padding: 20px;
    border: 2px solid var(--b2-gray-200);
    border-radius: var(--b2-radius);
    transition: all 0.2s;
}

.b2-service-card:hover {
    border-color: var(--b2-primary);
    box-shadow: var(--b2-shadow);
}

.b2-service-card.selected {
    border-color: var(--b2-primary);
    background: #e7f1ff;
}

.b2-service-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.b2-service-header h4 {
    margin: 0;
    font-size: 18px;
}

.b2-service-duration {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--b2-gray-300);
}

.b2-service-description {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--b2-gray-300);
}

.b2-service-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.b2-service-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--b2-primary);
}

.b2-meeting-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.b2-meeting-type {
    cursor: pointer;
}

.b2-meeting-type input[type="radio"] {
    display: none;
}

.b2-meeting-type-card {
    padding: 24px;
    text-align: center;
    border: 2px solid var(--b2-gray-200);
    border-radius: var(--b2-radius);
    transition: all 0.2s;
}

.b2-meeting-type:hover .b2-meeting-type-card {
    border-color: var(--b2-primary);
}

.b2-meeting-type.selected .b2-meeting-type-card {
    border-color: var(--b2-primary);
    background: #e7f1ff;
}

.b2-meeting-type-card i {
    font-size: 48px;
    color: var(--b2-primary);
    margin-bottom: 16px;
}

.b2-meeting-type-card h4 {
    margin: 0 0 8px;
    font-size: 18px;
}

.b2-meeting-type-card p {
    margin: 0;
    font-size: 14px;
    color: var(--b2-gray-300);
}

.b2-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

/* ==========================================================================
   Posts Grid
   ========================================================================== */
.b2-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.b2-post-card {
    background: #fff;
    border-radius: var(--b2-radius);
    overflow: hidden;
    box-shadow: var(--b2-shadow);
    transition: all 0.2s;
}

.b2-post-card:hover {
    box-shadow: var(--b2-shadow-lg);
    transform: translateY(-2px);
}

.b2-post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.b2-post-content {
    padding: 20px;
}

.b2-post-title {
    margin: 0 0 12px;
    font-size: 18px;
}

.b2-post-title a {
    color: var(--b2-gray-800);
    text-decoration: none;
}

.b2-post-title a:hover {
    color: var(--b2-primary);
}

.b2-post-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--b2-gray-300);
}

.b2-post-excerpt {
    margin-bottom: 16px;
    color: var(--b2-gray-300);
}

.b2-read-more {
    color: var(--b2-primary);
    text-decoration: none;
    font-weight: 500;
}

.b2-read-more:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Loading & Messages
   ========================================================================== */
.b2-loading {
    text-align: center;
    padding: 40px;
    color: var(--b2-gray-300);
}

.b2-empty-message {
    text-align: center;
    padding: 40px;
    color: var(--b2-gray-300);
    font-style: italic;
}

.b2-widget-error,
.b2-widget-info {
    padding: 16px 20px;
    border-radius: var(--b2-radius);
    border-left: 4px solid;
}

.b2-widget-error {
    background: #f9e5e5;
    border-color: var(--b2-danger);
    color: var(--b2-danger);
}

.b2-widget-info {
    background: #e7f1ff;
    border-color: var(--b2-primary);
    color: var(--b2-primary);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .b2-widget {
        padding: 20px;
    }

    .b2-form-row {
        grid-template-columns: 1fr;
    }

    .b2-dashboard-stats {
        grid-template-columns: 1fr;
    }

    .b2-services-grid {
        grid-template-columns: 1fr;
    }

    .b2-meeting-types {
        grid-template-columns: 1fr;
    }

    .b2-posts-grid {
        grid-template-columns: 1fr;
    }

    .b2-step-actions {
        flex-direction: column;
    }

    .b2-step-actions .b2-btn {
        width: 100%;
    }
}