/* Credly Certifications Display Styles */
/* Version 1.1.0 */

.credly-certifications-wrapper {
    max-width: 100%;
    margin: 20px 0;
}

/* Search Form Styles */
.credly-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.credly-search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.credly-state-filter {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background: white;
    cursor: pointer;
}

.credly-search-btn {
    padding: 12px 24px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.credly-search-btn:hover {
    background: #0052a3;
}

.credly-loading {
    color: #666;
    font-style: italic;
}

/* Grid Layout */
.credly-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 20px;
}

.credly-badge-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.credly-badge-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.badge-image {
    text-align: center;
    margin-bottom: 16px;
}

.badge-image img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

.badge-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.badge-name {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #333;
    line-height: 1.3;
}

.badge-recipient {
    font-size: 14px;
    color: #555;
    margin: 4px 0;
}

.badge-issuer {
    font-size: 14px;
    color: #777;
    margin: 4px 0;
}

.badge-date {
    font-size: 13px;
    color: #999;
    margin: 4px 0;
}

.badge-expires {
    font-size: 13px;
    color: #e67e22;
    margin: 4px 0;
    font-weight: 500;
}

.badge-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 12px 0;
    flex: 1;
}

.badge-skills {
    font-size: 12px;
    color: #0066cc;
    margin: 8px 0;
    padding: 8px 0;
    border-top: 1px solid #eee;
}

.badge-verify-link {
    display: inline-block;
    margin-top: auto;
    padding: 10px 16px;
    background: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    transition: background 0.3s;
}

.badge-verify-link:hover {
    background: #0052a3;
    color: white;
}

/* List Layout */
.credly-badges-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.credly-badge-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.credly-badge-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: box-shadow 0.3s;
}

.credly-badge-list-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.badge-list-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.badge-list-content {
    flex: 1;
    font-size: 16px;
}

.badge-list-content strong {
    color: #333;
    font-weight: 600;
}

.badge-list-date {
    color: #999;
    font-size: 14px;
}

.badge-list-content a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.badge-list-content a:hover {
    text-decoration: underline;
}

/* Count Display */
.credly-count {
    text-align: center;
    padding: 16px;
    font-size: 14px;
    color: #666;
    background: #f9f9f9;
    border-radius: 4px;
    margin-top: 20px;
}

#credly-count {
    font-weight: 600;
    color: #0066cc;
}

/* Error and No Results */
.credly-error {
    padding: 20px;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 4px;
    color: #c33;
    text-align: center;
}

.credly-no-results {
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 16px;
}

/* Secure Mode Empty State */
.credly-secure-empty {
    padding: 60px 40px;
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 8px;
    color: #666;
    font-size: 16px;
    text-align: center;
}

.credly-secure-empty::before {
    content: "🔒";
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .credly-badges-grid {
        grid-template-columns: 1fr;
    }
    
    .credly-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .credly-search-input {
        min-width: 100%;
    }
    
    .credly-search-btn {
        width: 100%;
    }
    
    .badge-image img {
        width: 120px;
        height: 120px;
    }
    
    .credly-badge-list-item {
        flex-direction: column;
        text-align: center;
    }
    
    .credly-secure-empty {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .badge-name {
        font-size: 18px;
    }
    
    .badge-image img {
        width: 100px;
        height: 100px;
    }
    
    .credly-secure-empty::before {
        font-size: 36px;
    }
}
