/* Sales Referral Tracker Frontend Styles */

/* Contact Card - Modern Layout */
.srt-contact-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    max-width: 800px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.srt-card-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.srt-card-left {
    flex: 1;
    min-width: 0;
}

.srt-card-right {
    flex-shrink: 0;
    text-align: center;
}

/* Profile Photo - Only shown for referrals */
.srt-contact-photo {
    margin-bottom: 20px;
}

.srt-contact-photo img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0f0f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Profile Photo Shortcode Styles */
.zbs-profile-photo {
    max-width: 100%;
    height: auto;
    border: 2px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: block;
}

.zbs-profile-photo.zbs-photo-circle {
    border-radius: 50%;
    object-fit: cover;
}

/* Profile Card Shortcode Styles */
.zbs-profile-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    max-width: 600px;
}

.zbs-profile-photo-left {
    flex-shrink: 0;
}

.zbs-profile-photo-left img {
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.zbs-profile-content {
    flex: 1;
    min-width: 0;
}

.zbs-profile-name {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
}

.zbs-profile-bio {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.zbs-profile-bio p {
    margin: 0 0 8px 0;
}

.zbs-profile-bio p:last-child {
    margin-bottom: 0;
}

.zbs-profile-contacts {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start; /* Left aligned by default */
}

.zbs-contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border-radius: 50%;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.zbs-contact-icon:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Custom icon image sizing */
.zbs-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* LINE icon specific adjustments */
.zbs-line-icon {
    padding: 0;
}

.zbs-line-icon .zbs-icon-img {
    width: 22px;
    height: 22px;
}

.zbs-profile-qr-right {
    flex-shrink: 0;
    text-align: center;
}

.zbs-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
}

.zbs-qr-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 2px;
}

.zbs-qr-link:hover {
    background: rgba(255,255,255,0.5);
    transform: translateY(-1px);
}

.zbs-qr-image {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.zbs-qr-link:hover .zbs-qr-image {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.zbs-qr-label {
    margin: 0;
    font-size: 11px;
    color: #666;
    line-height: 1.2;
    text-align: center;
    max-width: 80px;
    word-break: break-word;
    transition: color 0.2s ease;
}

.zbs-qr-link:hover .zbs-qr-label {
    color: #333;
}

/* Responsive */
@media (max-width: 480px) {
    .zbs-profile-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .zbs-profile-photo-left {
        align-self: center;
        order: 1;
    }

    .zbs-profile-content {
        order: 2;
    }

    .zbs-profile-qr-right {
        align-self: center;
        order: 3; /* Move QR below content on mobile - after bio */
    }

    .zbs-profile-contacts {
        justify-content: center; /* Center icons on mobile */
    }
}

.srt-contact-name {
    margin: 0 0 20px;
    font-size: 26px;
    font-weight: 600;
    color: #2c3e50;
}

.srt-contact-bio {
    color: #666;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
}

/* Contact Details - Modern Style */
.srt-contact-details {
    margin: 25px 0;
}

.srt-contact-item {
    margin: 15px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.srt-icon-circle {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.srt-item-content {
    flex: 1;
    min-width: 0;
}

.srt-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 2px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.srt-contact-item a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    word-break: break-word;
}

.srt-contact-item a:hover {
    color: #667eea;
}

.srt-address-text {
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.5;
}

/* Social Links - Only for Referrals */
.srt-social-links {
    display: flex;
    gap: 12px;
    margin: 25px 0 0;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
}

.srt-social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.srt-social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.srt-social-facebook:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.srt-social-instagram:hover { background: #e4405f; color: #fff; border-color: #e4405f; }
.srt-social-linkedin:hover { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.srt-social-twitter:hover { background: #1da1f2; color: #fff; border-color: #1da1f2; }

/* QR Code - Right Side */
.srt-qr-container {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.srt-qr-container img {
    width: 180px;
    height: 180px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.srt-qr-label {
    margin-top: 12px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* Shortcode Styles */
.srt-phone,
.srt-email,
.srt-line,
.srt-address {
    display: inline-block;
}

.srt-address {
    padding: 10px 0;
}

.srt-address-text {
    display: inline-block;
    vertical-align: top;
    margin-left: 5px;
}

.srt-bio {
    padding: 15px;
    background: #f5f5f5;
    border-left: 3px solid #0073aa;
    margin: 20px 0;
}

/* Frontend Dashboard */
.srt-frontend-dashboard {
    padding: 20px 0;
}

.srt-frontend-dashboard h2 {
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.srt-frontend-dashboard h3 {
    color: #555;
    margin: 30px 0 15px;
}

/* Stats Grid */
.srt-frontend-dashboard .srt-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.srt-frontend-dashboard .srt-stat-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.srt-frontend-dashboard .srt-stat-box h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #666;
}

.srt-frontend-dashboard .srt-stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #0073aa;
    margin: 0;
}

/* Data Tables */
.srt-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fff;
}

.srt-data-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #ddd;
    font-weight: bold;
    color: #333;
}

.srt-data-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.srt-data-table tr:hover {
    background: #f9f9f9;
}

.srt-data-table code {
    background: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
}

/* Referral Link */
.srt-referral-link {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    align-items: center;
}

.srt-link-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #f9f9f9;
    font-family: monospace;
}

.srt-copy-btn {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.3s;
}

.srt-copy-btn:hover {
    background: #005985;
}

/* Attribution */
.srt-attribution {
    background: #fffbdc;
    border: 1px solid #f0e68c;
    padding: 10px 15px;
    border-radius: 3px;
    margin: 20px 0;
    text-align: center;
    font-style: italic;
    color: #666;
}

/* Chart Container */
.srt-chart-container {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 20px 0;
}

/* LINE Button */
a.srt-line.button {
    background: #00c300;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    text-decoration: none;
    transition: background 0.3s;
}

a.srt-line.button:hover {
    background: #00a300;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .srt-contact-card {
        max-width: 100%;
        padding: 20px;
    }

    .srt-card-content {
        flex-direction: column;
        gap: 25px;
    }

    .srt-card-right {
        width: 100%;
    }

    .srt-qr-container {
        max-width: 250px;
        margin: 0 auto;
    }

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

    .srt-social-links {
        flex-wrap: wrap;
    }

    .srt-data-table {
        font-size: 14px;
    }

    .srt-data-table th,
    .srt-data-table td {
        padding: 8px;
    }

    .srt-referral-link {
        flex-direction: column;
    }

    .srt-link-input {
        width: 100%;
    }
}

/* Loading State */
.srt-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* No Content Message */
.srt-no-content {
    text-align: center;
    padding: 30px;
    color: #999;
    font-style: italic;
}

/* Error Message */
.srt-error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
    padding: 15px;
    border-radius: 3px;
    margin: 20px 0;
}

/* Success Message */
.srt-success {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 3px;
    margin: 20px 0;
}

/* Special styling when it's default (not referral) */
.srt-contact-card:not(.srt-referral-active) .srt-contact-name {
    color: #667eea;
    text-align: center;
}

.srt-contact-card:not(.srt-referral-active) .srt-card-content {
    justify-content: center;
}

.srt-contact-card:not(.srt-referral-active) .srt-card-left {
    max-width: 500px;
}

/* ========================================
   Related Posts - Uniform Featured Images
   ======================================== */
.section-post-related .post-related .image_frame {
    display: block;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 5px !important;
}

.section-post-related .post-related .image_wrapper {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.section-post-related .post-related .image_frame .image_wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   Sticky LINE Button
   ======================================== */
.zbs-sticky-line {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    background: #06C755;
    border-radius: 20px 20px 0 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.zbs-sticky-line:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(6, 199, 85, 0.4);
}

.zbs-sticky-line svg {
    display: block;
}