/* === SW Download Manager - Frontend Styles === */

.swdm-wrap {
    display: grid;
    gap: 24px;
    margin: 20px 0;
}

/* Column grid */
.swdm-style-cards.swdm-cols-1 { grid-template-columns: 1fr; }
.swdm-style-cards.swdm-cols-2 { grid-template-columns: repeat(2, 1fr); }
.swdm-style-cards.swdm-cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 768px) {
    .swdm-style-cards.swdm-cols-3,
    .swdm-style-cards.swdm-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* === CARD STYLE === */
.swdm-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.swdm-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.swdm-card-icon {
    background: #f5f7fa;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.swdm-card-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 8px;
}

.swdm-default-icon {
    font-size: 48px;
    line-height: 1;
}

.swdm-card-body {
    padding: 18px 20px;
    flex: 1;
}

.swdm-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a2e;
    line-height: 1.3;
}

.swdm-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.5;
}

.swdm-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.swdm-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.swdm-version {
    background: #e8f4fd;
    color: #1a73e8;
}

.swdm-size {
    background: #f0fdf4;
    color: #16a34a;
}

.swdm-external {
    background: #fff7ed;
    color: #ea580c;
}

.swdm-card-footer {
    padding: 14px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

/* === BUTTON === */
.swdm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease;
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.swdm-btn:hover {
    background: #1d4ed8;
    color: #fff !important;
}

.swdm-btn-disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* === LIST STYLE === */
.swdm-style-list {
    grid-template-columns: 1fr !important;
}

.swdm-list-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 16px 20px;
    transition: box-shadow 0.2s ease;
}

.swdm-list-row:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.swdm-list-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
    border-radius: 8px;
}

.swdm-list-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.swdm-list-info {
    flex: 1;
}

.swdm-list-info .swdm-title {
    display: block;
    margin-bottom: 4px;
}

.swdm-list-info .swdm-desc {
    margin-bottom: 6px;
}

.swdm-list-action {
    flex-shrink: 0;
}

.swdm-list-action .swdm-btn {
    width: auto;
    white-space: nowrap;
}

.swdm-empty {
    text-align: center;
    color: #999;
    padding: 40px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

@media (max-width: 600px) {
    .swdm-list-row {
        flex-wrap: wrap;
    }
    .swdm-list-action {
        width: 100%;
    }
    .swdm-list-action .swdm-btn {
        width: 100%;
    }
}

/* === Access badges on cards === */
.swdm-card-icon {
    position: relative;
}
.swdm-access-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}
.swdm-public-badge {
    background: #f0fdf4;
    color: #16a34a;
}
.swdm-private-badge {
    background: #fef3c7;
    color: #b45309;
}

/* === Guest notice banner === */
.swdm-guest-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: #1e40af;
    margin-bottom: 20px;
}
.swdm-guest-notice a {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: underline;
}
