/**
 * Badge Sharing Modal Styles
 */

/* Modal Overlay */
.badge-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.badge-modal-overlay.show {
    opacity: 1;
}

/* Modal Container */
.badge-modal {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 229, 255, 0.2);
    border: 1px solid rgba(0, 229, 255, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.badge-modal-overlay.show .badge-modal {
    transform: scale(1);
}

/* Modal Header */
.badge-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    background: rgba(0, 229, 255, 0.05);
}

.badge-modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #00e5ff;
    font-weight: 600;
}

.badge-modal-close {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.badge-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Modal Body */
.badge-modal-body {
    padding: 28px;
}

/* Intro Section */
.badge-intro {
    margin-bottom: 24px;
}

.badge-intro p {
    margin: 0 0 8px 0;
    color: #e0e0e0;
    line-height: 1.6;
}

.badge-intro .repo-name {
    color: #00e5ff;
    font-size: 14px;
}

/* Badge Type Selector */
.badge-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.badge-type-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
}

.badge-type-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.3);
}

.badge-type-btn.active {
    background: rgba(0, 229, 255, 0.1);
    border-color: #00e5ff;
    color: #00e5ff;
}

.badge-icon {
    font-size: 24px;
}

/* Badge Preview Section */
.badge-preview-section {
    margin-bottom: 28px;
}

.badge-preview-section h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
}

.badge-preview-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.badge-preview-container img {
    max-width: 100%;
    height: auto;
    transition: transform 0.2s ease;
}

.badge-preview-container a:hover img {
    transform: scale(1.05);
}

/* Embed Code Section */
.embed-code-section {
    margin-bottom: 24px;
}

.embed-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.embed-tab {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.embed-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
}

.embed-tab.active {
    background: rgba(0, 229, 255, 0.1);
    color: #00e5ff;
}

.embed-code-container {
    position: relative;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 16px;
}

.embed-code {
    display: block;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: #c9d1d9;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    padding-right: 80px;
    line-height: 1.6;
}

.copy-code-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: #00e5ff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.copy-code-btn:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: #00e5ff;
}

.copy-code-btn svg {
    flex-shrink: 0;
}

/* Quick Actions */
.badge-quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.badge-action-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.badge-action-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.3);
    color: #00e5ff;
}

/* Tips */
.badge-tips {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.badge-tip {
    background: rgba(0, 184, 204, 0.1);
    border-left: 3px solid #00b8cc;
    border-radius: 4px;
    padding: 12px 16px;
    color: #e0e0e0;
    font-size: 13px;
    line-height: 1.5;
}

.badge-tip strong {
    color: #00e5ff;
}

/* Get Badge Button (for scan results) */
.get-badge-btn {
    background: linear-gradient(135deg, #00e5ff 0%, #00b8cc 100%);
    color: #0a0a0a;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 229, 255, 0.3);
}

.get-badge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.4);
}

.get-badge-btn svg {
    flex-shrink: 0;
}

/* Badge Success Message (shown after scan completes) */
.badge-success-message {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.1) 0%, rgba(0, 184, 204, 0.1) 100%);
    border: 2px solid rgba(0, 229, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: start;
    gap: 16px;
}

.badge-success-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.badge-success-content h3 {
    margin: 0 0 8px 0;
    color: #00e5ff;
    font-size: 18px;
    font-weight: 600;
}

.badge-success-content p {
    margin: 0 0 16px 0;
    color: #e0e0e0;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .badge-modal {
        max-width: 100%;
        margin: 20px;
    }

    .badge-modal-header {
        padding: 20px;
    }

    .badge-modal-body {
        padding: 20px;
    }

    .badge-type-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .badge-quick-actions {
        flex-direction: column;
    }

    .badge-action-link {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .badge-modal-header h2 {
        font-size: 20px;
    }

    .badge-type-selector {
        grid-template-columns: 1fr;
    }

    .embed-code {
        font-size: 12px;
    }

    .copy-code-btn {
        position: static;
        width: 100%;
        margin-top: 12px;
        justify-content: center;
    }

    .embed-code {
        padding-right: 16px;
    }
}

/* Scrollbar Styling for Modal */
.badge-modal::-webkit-scrollbar {
    width: 8px;
}

.badge-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.badge-modal::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.3);
    border-radius: 4px;
}

.badge-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.5);
}
